Having problem with my code I will post below. In the RPM/WPM section I used to have (LocalPlayerBasePointer + AmmoOffset) when I had this instead of (RifleAmmoAddress) the code would work.
But when I try to make it simple and easier to read by creating a new variable: DWORD RifleAmmoAddress = LocalPlayerBasePointer + AmmoOffset and use it as shown below in the RPM/WPM it won't work using the new simplified variable.
Anyone know what I'm doing wrong can you please help me thanks? I been trying to figure out for days and cannot find what is wrong.
=========================================================================
{
ReadProcessMemory(hProcess, (LPCVOID*)(ClientAddress), &LocalPlayerBasePointer, sizeof(LocalPlayerBasePointer), NULL);
cout << "This is the address of ClientBaseAddress + ClientOffset = " << LocalPlayerBasePointer << endl;
system("PAUSE");
// Text current disabled only enable for testing
}
ReadProcessMemory(hProcess, (LPCVOID*)(RifleAmmoAddress), &CurrentAmmo, sizeof(CurrentAmmo), NULL);
cout << "This is your Current Ammo = " << CurrentAmmo << endl;
system("PAUSE");
cout << "BEFORE AMMO HACK IS ENABLED ENTER THE AMOUNT AMMO YOU WANT: " << endl;
system("PAUSE");
cin >> NewAmmovalue;
WriteProcessMemory(hProcess, (VOID*)(RifleAmmoAddress), &NewAmmovalue, sizeof(NewAmmovalue), NULL);
cout << "This is the Ammo Hack that will be written. " << NewAmmovalue << endl;
Note that if LocalPlayerBaseAddress or AmmoOffset is updated you need to also update RifleAmmoAddress otherwise it will keep its old value that it had from the start.
RifleAmmoAddress has no value. It is to make to other variable more simpler. RifleAmmoAddress = LocalPlayerBaseAddress (this is what is stored from the first RPM) + AmmoOffset.
The way you've show your code above, you set RifleAmmoAddress too early, before LocalPlayerBaseAddress has a value. You need to set RifleAmmoAddress after you read LocalPlayerBaseAddress from the process.