#define LTPlayerClient 0x1AB09B0
#define GravityZ 0xAAC
DWORD pCLTPlayerClient = *(DWORD*)((BSNSHL + LTPlayerClient) + 0x78)/*Offset_LTPlayerClient)*/;
if (GetAsyncKeyState(VK_F11) & 1)
{
//=======================[Fly Hack ON]============================//
if (pCLTPlayerClient)
{
old = *(float*)(pCLTPlayerClient + GravityZ);
*(float*)(pCLTPlayerClient + GravityZ) = -2.125f;
}
}
...#define PlayerClientAddress 0x000000 //3D ?? ?? ?? ?? 7C EE A1 // Update the addr by yourself search this pattern
#define PlayerClientOffset 0x7C // 8B 4B ?? 85 C9 74 ?? 8B 01 FF 90
void Init_Hacks(void)
{
if (!InGame()) return; // you should check it on InGame to prevent the errors in loading screen or in not InGame
DWORD CShell_Module = (DWORD)GetModuleHandle("CShell.dll");
if (CShell_Module == NULL) return;
DWORD PlayerClient_Fly = *(DWORD*)(CShell_Module + PlayerClientAddress + PlayerClientOffset);
if (PlayerClient_Fly != NULL)
{
if (GetAsyncKeyState(VK_SPACE)) // press space to fly
{
*(float*)(PlayerClient_Fly + 0xAAC) = -2.125f;
}
else
{
*(float*)(PlayerClient_Fly + 0xAAC) = 1.0f; // 1.0f is the default value try to log it
}
}
}