#include <windows.h>
#include "CPatch.h"
#define ADR_Playerpointer 0x
#define ADR_Serverpointer 0x
#define ADR_Glasswall 0x
#define ADR_Stamina1 0x
#define OFS_NoRecoil1 0x
#define OFS_NoRecoil2 0x
#define OFS_NoRecoil3 0x
#define OFS_X 0x
#define OFS_Z 0x
#define OFS_Y 0x
#define ADR_SNS 0x
#define OFS_Nfd 0x
#define ADR_Speed 0x
#define OFS_WTW 0x
#define ADR_FastAmmo 0x
#define ADR_FastMedic 0x
#define ADR_FastFlag 0x
#define ADR_FastRepair 0x
#define ADR_NearFog 0x
#define ADR_FarFog 0x
#define ADR_AutoAmmoMedic 0x
#define ADR_AutoAmmo 0x
#define ADR_STW 0x
#define ADR_FullBright1 0x
#define ADR_FullBright2 0x
#define ADR_FullBright3 0x
#define ADR_NoWater1 0x
#define ADR_NoWater2 0x
#define WallClimb_Int 0x
#define OFS_NoDelay 0x
#define ADR_UnlimitedAmmo 0x
#define ADR_HideIGN 0x
//Hacks
float posiY;
float posiX;
float posiZ;
DWORD PlayerOPK = 0; <- You Can Give Me The Correct Place this
CPatch pammo (ADR_UnlimitedAmmo , 6);
DWORD *ingame= (DWORD*)ADR_Playerpointer;
DWORD *outgame= (DWORD*)ADR_Serverpointer;
void glasswall()
{
if(GetKeyState(VK_MBUTTON))
*(int*)ADR_Glasswall = 1;
else
{
*(int*)ADR_Glasswall = 0;
}
}
void Superjump()
{
DWORD dwPlayerPtr = *(DWORD*)ADR_Playerpointer;
if(dwPlayerPtr != 0)
{
if(GetAsyncKeyState(VK_CONTROL)&1)
{
*(float*)(dwPlayerPtr +OFS_Z ) = 1300;
}
}
}
void dig()
{
if(GetAsyncKeyState(VK_MENU) &1)
{
DWORD dwPlayerPtr = *(DWORD*)ADR_Playerpointer;
*(float*)(dwPlayerPtr+OFS_Z) = -1000;
}
}
void All()
{
DWORD dwPlayerPtr = *(DWORD*)ADR_Playerpointer;
if(dwPlayerPtr != 0)
*(float*)(dwPlayerPtr+OFS_NoRecoil1) = 0;
*(float*)(dwPlayerPtr+OFS_NoRecoil2) = 0;
*(float*)(dwPlayerPtr+OFS_NoRecoil3) = 0;
*(float*)(dwPlayerPtr+OFS_Nfd) = -2000;
*(double*)ADR_SNS = 0;
*(float*)ADR_Stamina1 = 10000;
*(float*)ADR_FastAmmo = 5000000;
*(float*)ADR_FastMedic = 5000000;
*(float*)ADR_FastFlag = 5000000;
*(float*)ADR_FastRepair = 5000000;
*(long*)(ADR_HideIGN) = 0;
;}
void SpeedOn()
{
if(GetAsyncKeyState(VK_UP) & 1)
{
MessageBeep(MB_ICONINFORMATION);
if (ADR_Speed > 100 )
{
*(float*)ADR_Speed = *(float*) (ADR_Speed) + 100.f;
}}}
void SpeedOff()
{
if(GetAsyncKeyState(VK_DOWN) & 1)
{
MessageBeep(MB_ICONINFORMATION);
if (ADR_Speed > 10 )
{
*(float*)ADR_Speed = *(float*) (ADR_Speed) - 97.0f;
}}}
void Teleport()
{
DWORD dwPlayerPtr = *(DWORD*)ADR_Playerpointer;
if(dwPlayerPtr != 0)
{
if (GetAsyncKeyState(VK_F10))
{
MessageBeep(MB_ICONINFORMATION);
posiX = *(float*)(dwPlayerPtr + OFS_X);
posiY = *(float*)(dwPlayerPtr + OFS_Y);
posiZ = *(float*)(dwPlayerPtr + OFS_Z);
}
if (GetAsyncKeyState(VK_F11))
{
MessageBeep(MB_ICONINFORMATION);
*(float*)(dwPlayerPtr + OFS_X) = posiX;
*(float*)(dwPlayerPtr + OFS_Y) = posiY;
*(float*)(dwPlayerPtr + OFS_Z) = posiZ;
}
}
}
void fullbright()
{
*(int*)ADR_FullBright1 = 1092779973;
*(int*)ADR_FullBright2 = 1092779973;
*(int*)ADR_FullBright3 = 1092779973;
}
void nowater()
{
*(int*)ADR_NoWater1 = 99999;
*(int*)ADR_NoWater2 = 99999;
}
void WallClimb()
{
if(GetAsyncKeyState(VK_NUMPAD1)&1)
{
*(float*)(WallClimb_Int) = 999;
}
if(GetAsyncKeyState(VK_NUMPAD2)&1)
{
*(float*)(WallClimb_Int) = 5.0e1;
}
}
void NOFOG()
{
*(float*)ADR_FarFog= 1166127104;//far fog address
*(float*)ADR_NearFog= 1166127104; //nearfog address
}
void STWOn()
{
if(GetAsyncKeyState(VK_INSERT) &1)
{
MessageBeep(MB_ICONINFORMATION);
*(double*)ADR_STW = 0;
}
}
void STWOff()
{
if(GetAsyncKeyState(VK_HOME) &1)
{
MessageBeep(MB_ICONINFORMATION);
*(double*)ADR_STW = 0.5;
}
}
void nodelay()
{
DWORD dwPlayerPtr = *(DWORD*)ADR_Playerpointer;
if(dwPlayerPtr != 0)
{
if(GetAsyncKeyState(VK_LBUTTON))
{
*(DWORD*)(dwPlayerPtr+OFS_NoDelay) = -0;
}
}
}
void ammoon()
{
if(GetAsyncKeyState(VK_F5) &1)
{
MessageBeep(MB_ICONINFORMATION);
pammo.PatchOnce ((void *)"\x00\x00\x00\x00",4);
}
}
void ammooff()
{
if(GetAsyncKeyState(VK_F6) &1)
{
MessageBeep(MB_ICONINFORMATION);
pammo.RestorePatch();
}
}
void SaveAmmo()
{
if (GetAsyncKeyState(VK_F8)) //record ammo
{
MessageBeep(MB_ICONINFORMATION);
*(int*)ADR_UnlimitedAmmo;
}
}
void WTW() <- Private
struct CPlayer
{
char xUnknown1[155];//0x10239
float NoFallDamage;//0x102D4
char xUnknown2[20];//0x102D8
float posX;//0x102EC
char xUnknown3[12];//0x102F0
float posY;//0x102F4
char xUnknown4[12];//0x102F8
float posZ;//0x102FC
char xUnknown5[224];//0x10400
DWORD NoDelay;//0x10400
char xUnknown6[225];//0x10300
DWORD PlayerOPK;//0x102FD
};
struct CBase
{
CPlayer* pLocal;
char xJumpToAdress1[1171732];
CPlayer** pGlobal;
};
CBase* p_PlayerA = (CBase*)ADR_Playerpointer;
void OPK()
{
DWORD Player = *(DWORD*)ADR_Playerpointer;
if(GetAsyncKeyState(VK_END)&1)
if(Player != 0)
{
if (p_PlayerA->pLocal)
{
if (PlayerOPK == 1) /*Player OPK*/
{
for(int i = 0; i < 32; i++)
{
CPlayer* pLocal = p_PlayerA->pGlobal[i];
p_PlayerA->pLocal->posX= 0;
p_PlayerA->pLocal->posY= 0;
p_PlayerA->pLocal->posZ= 0;
}
}
}
}
}
void HackThread()
{
for(;; )
{
if(*ingame)
{
glasswall();
All();
Superjump();
dig();
SpeedOn();
SpeedOff();
Teleport();
WTW();
nowater();
fullbright();
WallClimb();
NOFOG();
STWOn();
STWOff();
nodelay();
ammoon();
ammooff();
SaveAmmo();
OPK();
}
if(*outgame)
{
glasswall();
}
Sleep(0);
}
}
BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwReason, LPVOID lpvReserved)
{
if(dwReason == DLL_PROCESS_ATTACH)
{
MessageBoxA(NULL,"BMPH,Mervin Coderz","Created",MB_OK);
MessageBoxA(NULL,"Trial Ghame Coderz","For The addies Of Hide IGn",MB_OK);
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)HackThread , 0, 0, 0);
}
return TRUE;
}
Why on The OPK Cannot Work
Help Expert
Thanks For Helping Coders
OPK Expert Coders List:
@
Alex_Agnew (AeroMan)
@
Public3nemy (Yuri Vargas)
@
[W]eb[C]ombat (Jesus Ceballos)
@
d3ath (MJCreado)
@
EarlDakz (Earl Dakay)
@
donatello07 (Warrock07)
@
joker (3rdVision)
@
MPGH Coderz (Mark Tusoy)