Structs OPK Issue

Posts 1–6 of 6 · Page 1 of 1
Structs OPK Issue
Im trying to code OPK using structures from SK1LLOR and Directx. I go into game and activate it and nothing happens. BUT, when I walk forward 'W' it makes me go back. Like opposite. Heres my source C&P'd from my menu:

// 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;
}
}
}
}
Im sorry lol, not good with structs. Learning
Code:
pPlayerA->pos1 = 0;
pPlayerA->pos2 = 0;
pPlayerA->pos3 = 0;
change that in
Code:
pPlayerA->zombie1 = 0;
pPlayerA->zombie2 = 0;
pPlayerA->zombie3 = 0;
that must work
kk thanks will try, and is that for playeropk or zombie? thanks again
Both use that, but source of zombie opk is different but very easy to make
You can't edit Vehicle struct.. IF u do it it's all wrong.

Code:
struct CVehicle
{
 char blablabla[0];
 int blablabla1;
}

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)
Posts 1–6 of 6 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us