LocalPlayer not a valid pointer?
Hey, I've ran into a new problem.. I initialized my classes and tried to debug the LocalPlayer address to check if it's a valid pointer for my classes to check my position. Well, it's apparently not a valid pointer.. Here is the address I'm using (And for those of you who log in their base, I'll share my pattern to)
Address
Pattern
Here is my class for Object since I am using the origin offset to check position
Here is my PlayerInfo where I'm grabbing Object
here is how I'm initializing it
and here is how I'm trying to check my position
But it just returns "Can't Find Position" even when I'm spawned and walking around. I know my classes are being initialized, but what could I be doing wrong? Any help would be nice.
P.S., my gameclientshell class is fine, I even used the address for GetClientInfoMgr straight up and it still didn't work..
Address
Code:
define ADR_LocalPlayer 0x372A7920
Code:
#define PATT_LOCALPLAYER "\x8B\x41\x08\x6A\x00\x50\xE8\x00\x00\x00\x00" #define MASK_LOCALPLAYER "xxxxxxx????"
Code:
class _Object
{
public:
char Unknown0[4]; //0x0000
D3DXVECTOR3 origin; //0x0004
D3DXVECTOR3 HeadOrigin; //0x0010
};
Code:
class PlayerInfo
{
public:
__int32 Ping;
__int32 index;
char unknown0[12];
char Name[12];
char unknown1[12];
_Object *obj;
__int32 Kills;
__int32 Deaths;
__int32 KillsWhileAlive;
DWORD pUnknown1;
DWORD pUnknown2;
DWORD pUnknown3;
__int32 pSuicide;
__int32 pKillsAfterJoin;
__int32 pDoubleKill;
__int32 pMultiKill;
__int32 pUltraKill;
__int32 pFantastic;
char unknown3[4];
__int32 HeadShots;
__int32 pFTMission;
char unknown4[8];
__int32 Team;
char unknown5[4];
__int8 IsDead;
char unknown6[307];
__int32 pRank;
char unknown7[80];
__int32 pFTScore;
BYTE pFTSpawn;
char unknown8[3];
__int32 pFTLongestLife;
__int32 pFTKill;
char unknown9[80];
PlayerInfo* pNext;
};
here is how I'm initializing it
Code:
PlayerInfo * pLocal; GetLocalPlayer = (lpGetLocalPlayer)(ADR_LocalPlayer); ulThis = (unsigned long)(pGameClientShell->GetClientInfoMgr()); pLocal = GetLocalPlayer(ulThis);
Code:
if(ValidPointer(pLocal))
{
if((pLocal->obj->origin.x && pLocal->obj->origin.y && pLocal->obj->origin.z) == 0.0f)
{
sprintf(CantFindPos, "Can't Find Position");
Menu->DrawTextL(10, 10, WHITE, CantFindPos, pFont);
}else{
sprintf(FoundPos, "PosX - %d\nPosY - %d\nPosZ - %d", pLocal->obj->origin.x, pLocal->obj->origin.y, pLocal->obj->origin.z);
Menu->DrawTextL(10, 10, WHITE, FoundPos, pFont);
}
}
P.S., my gameclientshell class is fine, I even used the address for GetClientInfoMgr straight up and it still didn't work..
