Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while (TRUE)
- {
- if (GetAsyncKeyState(VK_NUMPAD1)) // HEALTH
- {
- int newHealth = 1666;
- WriteProcessMemory(hProcess, (BYTE*)healthAddr, &newHealth, sizeof(newHealth), nullptr);
- ReadProcessMemory(hProcess, (BYTE*)healthAddr, &HealthValue, sizeof(HealthValue), nullptr);
- std::cout << "New Health = " << std::dec << HealthValue << std::endl;
- Sleep(1000);
- }
- //---------------------------------------
- if (GetAsyncKeyState(VK_NUMPAD2)) // AMMO
- {
- int newAmmo = 1666;
- WriteProcessMemory(hProcess, (BYTE*)AmmoAddr, &newAmmo, sizeof(newAmmo), nullptr);
- ReadProcessMemory(hProcess, (BYTE*)AmmoAddr, &AmmoValue, sizeof(AmmoValue), nullptr);
- std::cout << "New Ammo = " << std::dec << AmmoValue << std::endl;
- Sleep(1000);
- }
- //---------------------------------------
- if (GetAsyncKeyState(VK_NUMPAD3)) // PISTOL AMMO
- {
- int newPistolAmmo = 1666;
- WriteProcessMemory(hProcess, (BYTE*)PistolAmmoAddr, &newPistolAmmo, sizeof(newPistolAmmo), nullptr);
- ReadProcessMemory(hProcess, (BYTE*)PistolAmmoAddr, &PistolAmmoValue, sizeof(PistolAmmoValue), nullptr);
- std::cout << "New Pistol Ammo = " << std::dec << PistolAmmoValue << std::endl;
- Sleep(1000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement