This is the code that I made, but it won't work.
Sorry for the inconvenience, but can someone point out what's the problem with my codes? Thanks.
Code:
#include <windows.h>
#define ADR_PlayerPointer 0x0055A6F8
#define ADR_ServerPointer 0x00A88CF0
#define ADR_Unliammo 0xA881A8 //Updated by Sir Coderz
#define OFS_NFD 0x102E8
#define OFS_X 0x10300
#define OFS_Y 0x10308
#define OFS_Z 0x10310
float posiY;
float posiX;
float posiZ;
DWORD ammo;
DWORD *ingame=(DWORD*)ADR_PlayerPointer;
DWORD *outgame=(DWORD*)ADR_ServerPointer;
void UnliAmmo()
{
DWORD dwPlayerPtr = *(DWORD*)ADR_PlayerPointer;
if(dwPlayerPtr != 0){
if (GetAsyncKeyState(VK_F8)) //PRESS AFTER RESPAWNING.
{
ammo = *(int*)ADR_Unliammo;
}
if(GetAsyncKeyState(VK_F5) &1) //PRESS THIS (TO ACTIVATE) AFTER PRESSING F8
{
*(int*)ADR_Unliammo = 0;
}
if(GetAsyncKeyState(VK_F6) &1) //PRESS THIS (DEACTIVATE) BEFORE THE GAMES END. (TO AVOID CRASHING)
{
*(int*)ADR_Unliammo = ammo ;
}
}
}
void HackThread()
{
for(;;)
{
if(*ingame)
{
UnliAmmo();
}
}
Sleep(200);
}
//prevent for overloading the cpu
BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwReason, LPVOID lpvReserved)
{
if(dwReason == DLL_PROCESS_ATTACH)
{
MessageBoxA(NULL, "Made by Josh", "Credit Here", MB_OK);
}
}