• Amused
  • Angry
  • Annoyed
  • Awesome
  • Bemused
  • Cocky
  • Cool
  • Crazy
  • Crying
  • Down
  • Drunk
  • Embarrased
  • Enraged
  • Friendly
  • Geeky
  • Godly
  • Happy
  • Hateful
  • Hungry
  • Innocent
  • Meh
  • Piratey
  • Poorly
  • Sad
  • Secret
  • Shy
  • Sneaky
  • Tired
  • Wtf
  • At Work
  • CodenzHub
  • Coding
  • Deejaying
  • Donating
  • Drinking
  • Eating
  • Editing
  • Hacking
  • Hate Mailing
  • Jamin'
  • Lagging
  • Live Streaming
  • Lurking
  • No Status
  • Pawning
  • PC Gaming
  • PS Gaming
  • Raging
  • Reversing
  • Sleeping
  • Steam Gaming
  • Trolling
  • TwitchStreamer
  • Vodka!
  • Watching TV/Movie
  • Xbox Gaming
  • Youtuber
  • Zombies
  • Results 1 to 6 of 6
    1. #1
      Jr.Coder
      Learning to hack games!
       
      Feeling Normal
       
      programmer's Avatar
      Join Date
      Jul 2012
      Location
      great britain
      Posts
      51
      Thanks (-->)
      0
      Thanks (<--)
      0

      hey whats the problem with this code

      John Kittz
      can any buddy help me fix this code pls :-\ :-\ :-\ :

      Code:
      #include &lt;iostream&gt;
      #include &lt;Windows.h&gt;
      #include &lt;string&gt;
      #include &lt;ctime&gt;
      
      
      std::string gamename = "AssaultCube";
      LPCSTR LGameWindow = "AssaultCube";
      std::string GameStatus;
      
      bool IsGameAvail;
      bool UpdateOnNextRun;
      
      //AMMO VARS
      bool AmmoStatus;
      BYTE AmmoValue&#91;] = {0xA3, 0X3C, 0X0, 0X0};
      DWORD AmmoBaseAdress = {0x004DF73C};
      DWORD AmmoOffsets&#91;] = {0x378, 0x14, 0x0};
      
      //HEALTH VARS
      bool HealthStatus;
      BYTE HealthValue&#91;] = {0x39, 0X5, 0X0, 0X0};
      DWORD HealthBaseAdress = {0x004DF73C};
      DWORD HealthOffsets&#91;] = {0xF4};
      
      //GRENADE VARS
      bool GrenadeStatus;
      BYTE GrenadeValue&#91;] = {0x39, 0X5, 0X0, 0X0};
      DWORD GrenadeBaseAdress = {0x004DF73C};
      DWORD GrenadeOffsets&#91;] = {0x387, 0x14, 0x0};
      
      int main()
      {
      	HWND hGameWindow = NULL;
      	int TimeSinceLastUpdate = clock();
      	int GameAvailTMR = clock();
      	int onePressTMR = clock();
      	DWORD dwProcID = NULL;
      	HANDLE hProcHandle = NULL;
      	UpdateOnNextRun = true;
      	std::string sAmmoStatus = "off";
      	std::string sHealthStatus = "off";
      	std::string sGrenadeStatus = "off";
      
      	while(!GetAsyncKeyState(VK_INSERT))
      	{
      
      		if(clock() - GameAvailTMR &gt; 100)
      		{
      			GameAvailTMR = clock();
      			IsGameAvail = false;
      
      			hGameWindow = FindWindow(NULL, LGameWindow);
      			if(hGameWindow)
      			{
      				GetWindowThreadProcessId( hGameWindow, &amp;dwProcID);
      				if(&amp;dwProcID != 0)
      				{
      					hProcHandle = OpenProcess(PROCESS_ALL_ACCESS, false, dwProcID);
      					if(hProcHandle == INVALID_HANDLE_VALUE || hProcHandle == NULL)
      					{
      						GameStatus = "Faild To Open Process For Valid Handle";
      					}
      					else
      					{
      						GameStatus = "AssaultCube Ready To Hack";
      						IsGameAvail = true;
      					}
      				}
      				else
      				{
      					GameStatus = "Faild To Get Process ID";
      				}
      			}
      			else
      			{
      				GameStatus = "AssaultCube Not Found";
      			}
      
      
      			if(UpdateOnNextRun || clock() - TimeSinceLastUpdate &gt; 5000)
      			{
      				system("cls");
      				std::cout &lt;&lt; "--------------------------------------------------------------------------------" &lt;&lt; std::endl;
      				std::cout &lt;&lt; "          AssaultCube Memory Hacker By Foad [Version 1.0]" &lt;&lt; std::endl;
      				std::cout &lt;&lt; "--------------------------------------------------------------------------------" &lt;&lt; std::endl &lt;&lt; std::endl;
      				std::cout &lt;&lt; "Game Status" &lt;&lt; GameStatus &lt;&lt; std::endl &lt;&lt; std::endl;
      				std::cout &lt;&lt; "[F1] Unlimited Ammo ---&gt;" &lt;&lt;sAmmoStatus &lt;&lt; "&lt;---" &lt;&lt; std::endl &lt;&lt; std::endl;
      				std::cout &lt;&lt; "[F2] Unlimited Health ---&gt;" &lt;&lt;sHealthStatus &lt;&lt; "&lt;---" &lt;&lt; std::endl &lt;&lt; std::endl;
      				std::cout &lt;&lt; "[F3] Unlimited Grenades ---&gt;" &lt;&lt;sGrenadeStatus &lt;&lt; "&lt;---" &lt;&lt;std::endl &lt;&lt; std::endl;
      				std::cout &lt;&lt; "[Insert] Exit" &lt;&lt; std::endl;
      				UpdateOnNextRun = false;
      				TimeSinceLastUpdate = clock();
      			}
      			if(IsGameAvail)
      			{
      				//WRITE TO MEMORY
      			}
      		}
      		if(clock() - onePressTMR &gt; 400)
      		{
      			if(IsGameAvail)
      			{
      				//Ammo
      				if(GetAsyncKeyState(VK_F1))
      				{
      				onePressTMR = clock();
      				AmmoStatus = !AmmoStatus;
      				UpdateOnNextRun = true;
      				if(AmmoStatus)sAmmoStatus = "On";
      				else sAmmoStatus = "Off";
      				}
      				//Health
      				if(GetAsyncKeyState(VK_F2))
      				{
      				onePressTMR = clock();
      				HealthStatus = !HealthStatus;
      				UpdateOnNextRun = true;
      				if(HealthStatus)sHealthStatus = "On";
      				else sHealthStatus = "Off";
      				}
      				//Grenade
      				if(GetAsyncKeyState(VK_F3))
      				{
      				onePressTMR = clock();
      				GrenadeStatus = !GrenadeStatus;
      				UpdateOnNextRun = true;
      				if(GrenadeStatus)sGrenadeStatus = "On";
      				else sGrenadeStatus = "Off";
      				}
      			}
      		}
      	}
      	CloseHandle(hProcHandle);
      	CloseHandle(hGameWindow);
      
      	return ERROR_SUCCESS;
      
      
      }
      
      
      DWORD FindOnAddy(int PointerLevel, HANDLE hProcHandle, DWORD Offsets&#91;],DWORD BaseAddress)
      {
      	DWORD pointer = BaseAddress;
      	DWORD pTemp;
      
      	DWORD pointerAddr;
      	for(int c = 0; c &lt; PointerLevel; c++)
      	{
      		if(c == 0)
      		{
      			ReadProcessMemory(hProcHandle, (LPCVOID)pointer, &amp;pTemp, sizeof(pTemp), NULL);
      		}
      		pointerAddr = pTemp + Offsets[c];
      		ReadProcessMemory(hProcHandle, (LPCVOID)pointerAddr, &amp;pTemp, sizeof(pTemp), NULL);
      	}
      	return pointerAddr;
      
      
      }
      
      void WriteToMemory(HANDLE hProcHandle)
      {
      	DWORD AddressToWrite;
      	if(AmmoStatus)
      	{
      		AddressToWrite = FindOnAddy(1, hProcHandle, AmmoOffsets, AmmoBaseAdress);
      		WriteProcessMemory(hProcHandle,(BYTE*)AddressToWrite, &amp;AmmoValue, sizeof(AmmoValue), NULL);
      	}
      
      	if(HealthStatus)
      	{
      		AddressToWrite = FindOnAddy(1, hProcHandle, HealthOffsets, HealthBaseAdress);
      			WriteProcessMemory(hProcHandle,(BYTE*)AddressToWrite, &amp;HealthValue, sizeof(HealthValue), NULL);
      
      
      	}
      	if(GrenadeStatus)
      	{
      		AddressToWrite = FindOnAddy(1, hProcHandle, GrenadeOffsets, GrenadeBaseAdress);
      			WriteProcessMemory(hProcHandle,(BYTE*)AddressToWrite, &amp;GrenadeValue, sizeof(GrenadeValue), NULL);
      	}
      }
      humans can success just if they failed .
      thank me if i helped .

      more thanks more hacks .

      programmer .

    2. #2
      Jr.Coder
      Learning to hack games!
       
      Feeling Normal
       
      programmer's Avatar
      Join Date
      Jul 2012
      Location
      great britain
      Posts
      51
      Thanks (-->)
      0
      Thanks (<--)
      0

      Re: hey whats the problem with this code

      I think that every buddy is just copying the code and dont leave a code of how to fix it
      humans can success just if they failed .
      thank me if i helped .

      more thanks more hacks .

      programmer .

    3. #3
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      TastyCookieez's Avatar
      Join Date
      Jun 2012
      Posts
      6
      Thanks (-->)
      0
      Thanks (<--)
      0

      Re: hey whats the problem with this code

      could you post what problems you're having with it?

    4. #4
      Jr.Coder
      Learning to hack games!
       
      Feeling Normal
       
      programmer's Avatar
      Join Date
      Jul 2012
      Location
      great britain
      Posts
      51
      Thanks (-->)
      0
      Thanks (<--)
      0

      Re: tastycookieez

      It loads very good but when i get in the game i press F1 it says unlimited ammo : on but its not .

      It should give 7000+ ammo and stay on 7000+ ammo when you shot but in this program it isnt giving 7000+ ammo and its not unlimited
      humans can success just if they failed .
      thank me if i helped .

      more thanks more hacks .

      programmer .

    5. #5
      Coder
      Learning to hack games!
       
      Coding
       
      Helios's Avatar
      Join Date
      May 2012
      Location
      Denmark
      Posts
      209
      Thanks (-->)
      24
      Thanks (<--)
      34

      Re: hey whats the problem with this code

      Where did you get that piece of code? I corrected something very similar to this for someone some time ago.

      Code:
      #include &lt;iostream&gt;
      #include &lt;Windows.h&gt;
      #include &lt;string&gt;
      #include &lt;ctime&gt;
      
      DWORD FindDmaAddy(int PointerLevel, HANDLE hProcHandle, DWORD Offsets&#91;], DWORD BaseAddress);
      void WriteToMemory(HANDLE hProcHandle);
      
      
      std::string GameName = "AssaultCube";
      LPCSTR LGameWindow = "AssaultCube";
      std::string GameStatus;
      
      bool IsGameAvail;
      bool UpdateOnNextRun;
      
      //AMMO VARS
      bool AmmoStatus;
      BYTE AmmoValue&#91;] = {0xA3, 0X1C, 0X0, 0X0};
      DWORD AmmoBaseAddress = {0x004DF73C};
      DWORD AmmoOffsets&#91;] = {0x378, 0x14, 0x0};
      
      //Health VARS
      bool HealthStatus;
      BYTE HealthValue&#91;] = {0x39, 0x5, 0X0, 0X0};
      DWORD HealthBaseAddress = {0x004DF73C};
      DWORD HealthOffsets&#91;] = {0xF4};
      
      
      
      int main()
      {
        HWND hGameWindow = NULL;
        int timeSinceLastUpdate = clock();
        int GameAvailTMR = clock();
        int onePressTMR = clock();
        DWORD dwProcID = NULL;
        HANDLE hProcHandle = NULL;
        UpdateOnNextRun = true;
        std::string sAmmoStatus = "OFF";
        std::string sHealthStatus = "OFF";
      
        while(!GetAsyncKeyState(VK_INSERT))
        {
         if(clock() - GameAvailTMR &gt; 100)
         {
           GameAvailTMR = clock();
           IsGameAvail = false;
      
           hGameWindow = FindWindow(NULL, LGameWindow);
           if(hGameWindow)
           {
            GetWindowThreadProcessId( hGameWindow, &amp;dwProcID);
            if(dwProcID != 0)
            {
              hProcHandle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, dwProcID);
              if(hProcHandle == INVALID_HANDLE_VALUE || hProcHandle == NULL)
              {
               GameStatus == "Failed to open process for valid handle";
              }
              else
              {
               GameStatus = "AssaultCube Ready To Hack";
               IsGameAvail = true;
              }
      
            }
            else
            {
              GameStatus = "Failed to get process ID";
            }
      
           }
           else
           {
            GameStatus = "AssaultCube NOT FOUND";
           }
      
           if(UpdateOnNextRun || clock() - timeSinceLastUpdate &gt; 5000)
           {
            system("cls");
            std::cout &lt;&lt; "----------------------------------------------------------" &lt;&lt; std::endl;
            std::cout &lt;&lt; "           AssaultCube memory hacker" &lt;&lt; std::endl;
            std::cout &lt;&lt; "----------------------------------------------------------" &lt;&lt; std::endl;
            std::cout &lt;&lt; "GAME STATUS:" &lt;&lt; GameStatus &lt;&lt; std::endl &lt;&lt; std::endl;
            std::cout &lt;&lt; "[F1] Unlimited ammo -&gt;" &lt;&lt;sAmmoStatus &lt;&lt; " &lt;- " &lt;&lt; std::endl;
            std::cout &lt;&lt; "[F2] Unlimited health -&gt;" &lt;&lt;sHealthStatus &lt;&lt; " &lt;- " &lt;&lt; std::endl;
            std::cout &lt;&lt; "[INSERT] Exit" &lt;&lt; std::endl;
            UpdateOnNextRun = false;
            timeSinceLastUpdate = clock();
           }
      
           if(IsGameAvail)
           {
            WriteToMemory(hProcHandle);
           }
         }
      
         if(clock() - onePressTMR &gt; 400)
         {
           if(IsGameAvail)
           {
            //ammo
            if(GetAsyncKeyState(VK_F1))
            {
      
              onePressTMR = clock();
              AmmoStatus = !AmmoStatus;
              UpdateOnNextRun = true;
              if(AmmoStatus)sAmmoStatus = "ON";
              else sAmmoStatus = "OFF";
            }
            //health
            if(GetAsyncKeyState(VK_F1))
            {
              onePressTMR = clock();
              HealthStatus = !HealthStatus;
              UpdateOnNextRun = true;
              if(HealthStatus)sHealthStatus = "ON";
              else sHealthStatus = "OFF";
            }
      
           }
         }
      
      
        }
      
        return ERROR_SUCCESS;
      
      
      }
      
      
      DWORD FindDmaAddy(int PointerLevel, HANDLE hProcHandle, DWORD Offsets&#91;], DWORD BaseAddress)
      {
        DWORD pointer = BaseAddress;
        DWORD pTemp;
      
        DWORD pointerAddr;
        for(int c =0; c &lt; PointerLevel; c++)
        {
         if(c == 0)
         {
           ReadProcessMemory(hProcHandle, (LPCVOID)pointer, &amp;pTemp, sizeof(pTemp), NULL);
         }
      
         pointerAddr = pTemp + Offsets[c];
         ReadProcessMemory(hProcHandle, (LPCVOID)pointerAddr, &amp;pTemp, sizeof(pTemp), NULL);
        }
        return pointerAddr;
      }
      void WriteToMemory(HANDLE hProcHandle)
      {
        if(AmmoStatus)
        {
         DWORD AddressToWrite = FindDmaAddy(3, hProcHandle, AmmoOffsets, AmmoBaseAddress);
         WriteProcessMemory(hProcHandle, (BYTE*)AddressToWrite, &amp;AmmoValue, sizeof(AmmoValue), NULL);
        }
        if(HealthStatus)
        {
         DWORD AddressToWrite = FindDmaAddy(1, hProcHandle, HealthOffsets, HealthBaseAddress);
         WriteProcessMemory(hProcHandle, (BYTE*)AddressToWrite, &amp;HealthValue, sizeof(HealthValue), NULL);
        }
      
      
      }

    6. #6
      Jr.Coder
      Learning to hack games!
       
      Feeling Normal
       
      saebur's Avatar
      Join Date
      Aug 2012
      Posts
      70
      Thanks (-->)
      3
      Thanks (<--)
      18
      Cheats'n'Trainers
      it could be because you're addresses and offsets are off? It shows that your ammo mode status works but you have to make sure you found the write addresses/offsets and make sure your function rewrites/jumps is logically right

    Similar Game Hacker Threads

    1. Replies: 6
      Last Post: 01-25-2016, 03:23 PM
    2. [Help] [SOLVED] Whats wrong?
      By Triggerex in forum Assault Cube Hacks
      Replies: 2
      Last Post: 11-02-2015, 04:24 PM
    3. [Off Topic] Whats your most visited sites?
      By Obsta in forum Off Topic
      Replies: 10
      Last Post: 08-26-2015, 07:56 PM
    4. [Help] Problem in Mid Function Hooking / Code Caving
      By bolla in forum GH Tutorials Help
      Replies: 5
      Last Post: 12-26-2013, 05:44 AM
    5. Whats Wrong With This Code ???
      By programmer in forum C/C++
      Replies: 7
      Last Post: 11-02-2012, 09:59 AM