__int32 ammo = 0x7FF68B932D2C; //0x0000
looks wrong.
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
thanks :PCode:#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); }
__int32 ammo = 0x7FF68B932D2C; //0x0000
looks wrong.
Last edited by abuckau907; 04-23-2015 at 11:23 AM.
'Some things that can be counted, don't matter. And some things that matter, can't be counted' - A.E.
--
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.
Last edited by abuckau907; 04-23-2015 at 02:54 PM.
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 doto get the base address.Code:DWORD dwBase = GetModuleHandle(NULL);
Recent releases:
CSPHv3.2
Can't see me calling, you hatin'?Code:00F38C0E B8 0610F300 MOV EAX, 00F31006 00F38C13 C700 208CF300 MOV DWORD PTR DS:[EAX], 00F38C20 00F38C19 EB FF JMP SHORT 00F38C1A 00F38C1B 90 NOP 00F38C1C 0000 ADD BYTE PTR DS:[EAX],AL 00F38C1E 0000 ADD BYTE PTR DS:[EAX],AL 00F38C20 58 POP EAX 00F38C21 ^EB EB JMP SHORT 00F38C0E
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.