// OPK
// Structures by Directx and SKIllor
struct CPlayer
{
char unknown0[50320]; //0x0000
BYTE index; //0xC490
char unknown50321[27]; //0xC491
// CVehicle* pVehicle; //0xC4AC
char unknown50352[15588]; //0xC4B0
float pitch; //0x10194
float yaw; //0x10198
char unknown65948[156]; //0x1019C
BYTE state; //0x10238
char unknown66105[19]; //0x10239
float pos1; //0x1024C
float pos2; //0x10250
float pos3; //0x10254
char unknown66136[136]; //0x10258
float zombie1; //0x102E0
char unknown66276[4]; //0x102E4
float zombie2; //0x102E8
char unknown66284[4]; //0x102EC
float zombie3; //0x102F0
char unknown66292[16716]; //0x102F4
};//Size=0x17C40(97344)
struct CBase
{
CPlayer* plocal; //0x000000
char unknown0[1169876]; //0x000004
CPlayer** player; //0x11D9B4
};
CBase* pBase = (CBase*)0x9E27B0;
void OPKThread()
{
DWORD Playerx = *(DWORD*)ADR_PlayerPointer;
if(Playerx != 0)
{
if(nPlayerOPK == 1)
{
for(int i = 0; i<32; i++) // Looping trough all 32 players. ( from 0 to 31 )
{
// Setting positions of all players to 0,0,0
CPlayer* pPlayerA = pBase->player[i];
pPlayerA->pos1 = 0;
pPlayerA->pos2 = 0;
pPlayerA->pos3 = 0;
// On some maps 0,0,0 is under water.
// *Addresses.waterheight = 0;
// On some maps you get killed cuz of falldamage
*(float*)(ADR_PlayerPointer+ADR_Nofalldmg) = -99999999;
}
}
}
}