HelpLocalPlayer not a valid pointer?

Posts 17 of 7 · Page 1 of 1
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
Code:
define ADR_LocalPlayer			0x372A7920
Pattern
Code:
#define PATT_LOCALPLAYER "\x8B\x41\x08\x6A\x00\x50\xE8\x00\x00\x00\x00"
#define MASK_LOCALPLAYER "xxxxxxx????"
Here is my class for Object since I am using the origin offset to check position
Code:
class _Object
{
public:
	char Unknown0[4]; //0x0000 
	D3DXVECTOR3 origin; //0x0004 
	D3DXVECTOR3 HeadOrigin; //0x0010
};
Here is my PlayerInfo where I'm grabbing Object
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);
and here is how I'm trying to check my position

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);
			}

		}
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..
did u update your playerinfo your self or copy some elses mine works fine
Quote Originally Posted by juggalo200 View Post
did u update your playerinfo your self or copy some elses mine works fine
I updated it while looking at someone else's playerinfo. Does yours differ from mine? Are you doing this any differently?
If I just see this char array name: "char Name[12];"
I could rage the whole day. It is a fucking STRING.
But its posted vereyhwere wrong...
not be so?

# Define PATT_LOCALPLAYER "\ x8B \ x41 \ x08 \ X6A \ x00 \ x50 \ XE8 \ x00 \ x00 \ x00 \ x00"
# define MASK_LOCALPLAYER "xxxx?xx????"
Quote Originally Posted by gibam761 View Post
not be so?

# Define PATT_LOCALPLAYER "\ x8B \ x41 \ x08 \ X6A \ x00 \ x50 \ XE8 \ x00 \ x00 \ x00 \ x00"
# define MASK_LOCALPLAYER "xxxx?xx????"
Do not forget the byte
+ 0x2
There is such an easier way to accomplish this...

Class/Function required to accomplish this:
Code:
class cLTBase
{
public:
	cLTClient* ILTClient;
	char unknown8[96];
	bool(WINAPIV *IntersectSegment)(pIntersectQuery& Query, pIntersectInfo *pInfo);
	char unknown104[28];
	unsigned int(WINAPIV *GetLocalClientID)(unsigned int *pIDOut);
	char unknown136[384];
	unsigned int(WINAPIV *RunConsoleCommand)(const char* szCommand);
	int*(WINAPIV *GetClientObject)(); 
	char unknown528[16];
	unsigned int(WINAPIV *GetObjectScale)(int* pObject, float *scale);
	unsigned int(WINAPIV *SetObjectScale)(int* pObject, float scale);
	char unknown552[4];
	unsigned int(WINAPIV *GetObjectColor)(int* pObject, float *r, float *g, float *b, float *a);
	unsigned int(WINAPIV *SetObjectColor)(int* pObject, float r, float g, float b, float a);
};

D3DXVECTOR3 cTools::MyGetObjectMaxPos(int *obj)
{
	return *(D3DXVECTOR3*)(obj + 0x4);
}
Checking if PlayerPos is active:
Code:
if(this->IsValidPointer(Main->Hack->GameClasses->pLTBase))
{
	int* MyObj = Main->Hack->GameClasses->pLTBase->GetClientObject();

	if(MyObj)
	{
		D3DXVECTOR3 MyPos = this->MyGetObjectMaxPos(MyObj);

		if(MyPos.x == 0.0f || MyPos.y == 0.0f || MyPos.z == 0.0f)
			return false;
		else
			return true;
	}
}
Also why are you taking up 4 lines to declare the class, much more concise:
Code:
GetLocalPlayer   = (lpGetLocalPlayer)(this->Addresses->dwLocalPlayer);	
cPlayerInfo *pLocal = GetLocalPlayer(this->GameClasses->pGameClientShell->GetClientInfoMgr());
Once declared, just use the pLocal pointer directly instead of creating a DWORD to be used aka ulThis.
Posts 17 of 7 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?