*(int*)(0x4E4DBC(start of player struct) + 0xF4(player health offset)) = 200;
DWORD base = (DWORD) GetModuleHandleA("ac_client.exe");
*(int*) (base + 0x4E4DBC + 0xF4) = 200;
DWORD base = (DWORD)GetModuleHandle("ac_client.exe");
DWORD playerStruct = base + 0xE4DBC;
int *hpPtr = (int*)(playerStruct + 0xF4);
*hpPtr = 200;
#define PLAYER_STRUCT *(DWORD*)((DWORD)GetModuleHandle("ac_client.exe") + 0xE4DBC)
#define HP_OFFSET 0x000F4
#define NAME_OFFSET 0x00219
DWORD WINAPI main(LPVOID)
{
char *buffer = new char[10];
int* hpPtr = (int*)(PLAYER_STRUCT + HP_OFFSET);
sprintf(buffer, "%d", *hpPtr);
MessageBoxA(NULL, buffer, "Your HP:", MB_OK);
char *name = (char*)(PLAYER_STRUCT + NAME_OFFSET);
MessageBoxA(NULL, name, "Your Name:", MB_OK);
}
*(float*)((*(DWORD*)((*(DWORD*)(CShell+0xA2A7E8)) +(4*i))) + 0x2424) = 100.0f;
PLAYER_STRUCT** pstruct; //player struct is a 2 level pointer. DWORD* firstPtr = (DWORD*)pstruct; //this has treated the pstruct as a DWORD*, ie C++ is saying treat this address as a pointer to a DWORD. DWORD val = *firstPtr; //dereferences the DWORD* to find out what the value was
//moving up pointer levels: PLAYER_STRUCT** pstruct = somevalue; PLAYER_STRUCT* uplevel = (PLAYER_STRUCT*)*(DWORD*)pstruct;
#define BASE_ADDRESS (DWORD)GetModuleHandle("ac_client.exe")
#define PLAYER_STRUCT *(DWORD*)(BASE_ADDRESS + 0xE4DBC)
#define HP_OFFSET 0x000F4
#define NAME_OFFSET 0x00219
#define UNLIM_AMMO (BASE_ADDRESS + (DWORD)0x5B75F)
#include <Windows.h>
#include <iostream>
#include "player.h"
void hack();
DWORD base = (DWORD)GetModuleHandle(TEXT("ac_client.exe"));
DWORD *playerStruct = (DWORD*)(base + 0x4E4DBC);
int *hpPtr = (int*)(playerStruct + 0xF4);
player *me = *(player**)0x4E4DBC;
float zpos;
float xsaved;
float ysaved;
float zsaved;
void hack()
{
*hpPtr = 200;
while(true)
{
if(GetAsyncKeyState(VK_SPACE)&1)
{
me->z += 5;
zpos = me->z;
while(!GetAsyncKeyState(VK_NUMPAD1)&1)
{
if(GetAsyncKeyState(VK_SPACE)&1)
{
me->z+= 5;
zpos = me->z;
}
me->z = zpos;
}
}
if(GetAsyncKeyState(VK_SHIFT)&1)
{
me->z -= 5;
}
if(GetAsyncKeyState(VK_LEFT)&1)
{
me->x -= 5;
}
if(GetAsyncKeyState(VK_RIGHT)&1)
{
me->x += 5;
}
if(GetAsyncKeyState(VK_UP)&1)
{
me->y += 5;
}
if(GetAsyncKeyState(VK_DOWN)&1)
{
me->y -= 5;
}
if(GetAsyncKeyState(VK_NUMPAD8)&1)
{
xsaved = me->x;
ysaved = me->y;
zsaved = me->z;
}
if(GetAsyncKeyState(VK_NUMPAD9)&1)
{
me->x = xsaved;
me->y = ysaved;
me->z = zsaved;
}
}
}
BOOL APIENTRY DllMain (HINSTANCE hInst /* Library instance handle. */ ,
DWORD reason /* Reason this function is being called. */ ,
LPVOID reserved /* Not used. */ )
{
switch (reason)
{
case DLL_PROCESS_ATTACH:
CreateThread(NULL, NULL,(LPTHREAD_START_ROUTINE)hack, NULL, NULL, NULL);
break;
case DLL_PROCESS_DETACH:
break;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
break;
}
/* Returns TRUE on success, FALSE on failure */
return TRUE;
}
#define BASE_ADDRESS (DWORD)GetModuleHandle("ac_client.exe")
#define PLAYER_STRUCT *(DWORD*)(BASE_ADDRESS + 0xE4DBC)
#define HP_OFFSET 0x000F4
#define NAME_OFFSET 0x00219
#define UNLIM_AMMO (BASE_ADDRESS + (DWORD)0x5B75F)
//globals
int* HP_POINTER = (int*)(PLAYER_STRUCT + HP_OFFSET);
player *MY_PLAYER = (player*)(PLAYER_STRUCT);
your player class fmm. NOPing the ammo calculation is easy though, and if you have godmode on it doesn't matter that the bots have unlimited ammo too 