//Solved.
TooShort
Hey guys, i have been learn c++ for about 3 weeks, and decided to make a quick ammo trainer for SP.
#include <iostream>
#include <Windows.h>
#include <string>
using namespace std;
DWORD pid;
DWORD ammo = 0x0F820A0;
int myammo = 900;
int main()
{
HWND hWnd = FindWindowA(0, ("iw5sp"));
GetWindowThreadProcessId(hWnd, &pid);
HANDLE pHandle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid);
WriteProcessMemory(pHandle, (LPVOID)ammo, &myammo, sizeof(myammo), 0);
system("pause");
}
That's my code, but when i execute it nothing happens in my game :|
Where did i go wrong? Thanks
- - - Updated - - -
Disregard this, solved it
i had the wrong address and window name
//Solved.
TooShort
Click Here to visit the official MPGH wiki! Keep up with the latest news and information on games and MPGH! To check out pages dedicated to games, see the links below!
dd/mm/yyyy
Member - 31/01/2015
Premium - 12/09/2016
Call of Duty minion - 05/11/2016 - 05/11/2019
BattleOn minion - 28/02/2017 - 05/11/2019
Battlefield minion - 30/05/2017 - 05/11/2019
Other Semi-Popular First Person Shooter Hacks minion - 21/09/2017 - 17/09/2019
Publicist - 07/11/2017 - 02/08/2018
Cock Sucker - 01/12/2017 - Unknown
Minion+ - 06/03/2018 - 05/11/2019
Fortnite minion - 08/05/2018 - 05/11/2019
Head Publicist - 08/10/2018 - 10/01/2020
Developer Team - 26/10/2019 - 10/01/2020
Former Staff - 10/01/2020