c++ GTA game hack

Posts 1–6 of 6 · Page 1 of 1
c++ GTA game hack
so im trying to get unlimited ammo for GTA V and this is what i have so far, its a .dll and when i inject it nothing happens can someone help me with this please
Code:
#include "ProcMem.h"
#include <iostream>
#include <windows.h>

using namespace std;



class PAmmo
{
public:

	__int32 ammo = 0x7FF68B932D2C; //0x0000 
	WORD unknown; //0x0004 
	char _0x0006[2];
	WORD unknown1; //0x0008 
	char _0x000A[54];

};//Size=0x0040


int main(){

	ProcMem mem;
	mem.GetProcess("GTA5.exe");
	
	PAmmo NewAmmo;
	mem.Write(NewAmmo.ammo, (INT32)40);





}
thanks :P
__int32 ammo = 0x7FF68B932D2C; //0x0000

looks wrong.
it was something like 'GTA5.exe+032304', but i dont know how i would put that in there?, i actually forget where i got that but there one that was the ammo was:
Code:
GTA5.exe+032304
Cool story bro.

That value is too large for an int32 variable.
Quote Originally Posted by hiimachicken1 View Post
it was something like 'GTA5.exe+032304', but i dont know how i would put that in there?, i actually forget where i got that but there one that was the ammo was:
Code:
GTA5.exe+032304
Process.exe+0x123456 means that the variable is at the base of the process + a certain offset. Since you have a dll, your code is going to be running in the address space of GTA, so you can just do
Code:
DWORD dwBase = GetModuleHandle(NULL);
to get the base address.
You really need to learn c++. If you're making a DLL you need to make DllMain instead of main. Also theres no point of using procmem internally since all it does is to fill the Read/WriteProcessMemory for you.
Posts 1–6 of 6 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us