i create a hack but that wont work can anybody see a mistake ? please help me
Code:
#include <windows.h>
// Adress List //
#define Playerpointer 0x00B04E10
#define Serverpointer 0x00AFF5D8
#define OFS_Z 0x10310
#define ADR_AUTOMEDIC 0x00507C28
#define ADR_Spread 0x00B094BC
DWORD *ingame= (DWORD*)Playerpointer;
DWORD *outgame= (DWORD*)Serverpointer;
void Jump() // superjump if hit control button
{
if(GetAsyncKeyState(VK_LCONTROL) &1)
{
DWORD dwPlayerPtr = *(DWORD*)Playerpointer;
if(dwPlayerPtr != 0)
{
*(float*)(dwPlayerPtr+OFS_Z) = 1500;
}
}
}
void automedic()
{
if(GetAsyncKeyState(VK_NUMPAD7) &1)
{
DWORD dwProtect;
const BYTE nop[6] = {0x90,0x90,0x90,0x90,0x90,0x90};
VirtualProtect((void*)(ADR_AUTOMEDIC), 6, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)ADR_AUTOMEDIC, &nop, 6);
VirtualProtect((void*)(ADR_AUTOMEDIC), 6, dwProtect, NULL);
}
}
void spread () // no spread
{
*(float*) ADR_Spread = 0;
}
void HackThread()
{
for(;; )
{
if(*ingame) //check if we are ingame.. prevent crashs
{
Jump();
}
if(*outgame)
{
}
Sleep(200); //prevent for overloading the cpu
}
}
BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwReason, LPVOID lpvReserved)
{
if(dwReason == DLL_PROCESS_ATTACH)
{
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)HackThread, 0, 0, 0); //create the hackthread
}
return TRUE;
}