Results 1 to 6 of 6
  1. #1
    hiimachicken1's Avatar
    Join Date
    Jan 2015
    Gender
    male
    Posts
    19
    Reputation
    18
    Thanks
    171
    My Mood
    Tired

    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

  2. #2
    abuckau907's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    other side of the wire
    Posts
    1,342
    Reputation
    162
    Thanks
    239
    My Mood
    Cold
    __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.
    --
     

    My posts have some inaccuracies/are wrong/wrong keyword(s) used.
    They're (maybe) pretty close, and I hope they helped you, not created confusion. Take with grain of salt.

    -if you give rep, please leave a comment, else it means less.

  3. #3
    hiimachicken1's Avatar
    Join Date
    Jan 2015
    Gender
    male
    Posts
    19
    Reputation
    18
    Thanks
    171
    My Mood
    Tired
    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

  4. #4
    abuckau907's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    other side of the wire
    Posts
    1,342
    Reputation
    162
    Thanks
    239
    My Mood
    Cold
    Cool story bro.

    That value is too large for an int32 variable.
    Last edited by abuckau907; 04-23-2015 at 02:54 PM.

  5. #5
    Harava's Avatar
    Join Date
    Sep 2013
    Gender
    male
    Posts
    114
    Reputation
    10
    Thanks
    2,989
    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.
    Recent releases:
    CSPHv3.2




    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
    Can't see me calling, you hatin'?

  6. #6
    gtaplayer2's Avatar
    Join Date
    Aug 2013
    Gender
    male
    Location
    Dancing with my kawaii friend
    Posts
    588
    Reputation
    22
    Thanks
    1,984
    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.

Similar Threads

  1. What would you look for in a game hacking tool kit?
    By Dave84311 in forum General Game Hacking
    Replies: 23
    Last Post: 06-02-2015, 06:34 AM
  2. MPGH Game Hacking Group
    By Dave84311 in forum General Game Hacking
    Replies: 22
    Last Post: 08-08-2007, 12:43 PM
  3. Web-based game hacking..
    By Krilliam in forum General Game Hacking
    Replies: 7
    Last Post: 02-20-2006, 01:12 PM
  4. how can i make game hack?!!!!
    By UnknownID in forum General Game Hacking
    Replies: 2
    Last Post: 02-07-2006, 07:21 PM
  5. Game Hacking IMPOSSIBLE IN VISTA?
    By Dave84311 in forum General Game Hacking
    Replies: 13
    Last Post: 01-09-2006, 08:58 PM