localplayerpointer

Posts 115 of 25 · Page 1 of 2
Why does it crash when used? Or am I just failing again? (me is nooby) /:

(Yes, I am waiting for CShell to be loaded. In fact, I only initialise this when in game - GameStatus = 1)

A degree of copy-pasting defense has been applied to this code. You should be able to work it out.

[php]
class CGameStatistics;
class CGameInfo;
class CGameWeaponInfo;
class CGameStats;
class CGameSomething;

CGameStatistics * GameStatistics = *(CGameStatistics**)GAMEADDRESS_LocalPlayerPointer ; // Local player pointer taken from sticky @ CA source code section ; thanks CodeDemon



class CGameStatistics // thanks to Gellin - only class names modified.
{
public:
CGameInfo* goToInfoClass; //0000
};

class CGameInfo
{
public:
char unknown0[102];
__int8 iHP;
__int8 iAP;
__int8 iMaxHP;
__int8 iMaxAP;
CGameWeaponInfo* goToWepInfo;
CGameSomething* goToSomething;
char unknown3[3024];
__int16 iIsUsingStamina;
__int16 iIsUsingStamina2;
char unknown4[200];
float fStamina;
char unknown5[80];
__int16 iWeaponSlotInUse;
D3DXVECTOR3 Pos;
char unknown6[302];
CGameStats* goToStats;
};

class CGameWeaponInfo
{
public:
__int8 iBackPackABulletsLeft; //0000
__int8 i2ndaryBulletsLeft; //0004
__int8 Unknown0; //0008
__int8 iGrenadesLeft; //000C
__int8 iBackPackBBulletsLeft; //0010
};

class CGameStats
{
public:
char unknown0[106];
char szLocalNameChangesInKill[106]; //0010
char unknown1[102];
__int8 iKills; //002C
__int8 iDeaths; //0030
char unknown2[404];
__int8 iHeadShots; //0060
};

class CGameSomething
{
public:
BYTE bIsAlive; //0000
};

[/php]
You should rename it
goToStats;

Wheres the stats class?
It's there /:

Code:
class CGameStats
{
public:
char unknown0[106];
char szLocalNameChangesInKill[106]; //0010
char unknown1[102];
__int8 iKills; //002C
__int8 iDeaths; //0030
char unknown2[404];
__int8 iHeadShots; //0060
};
Quote Originally Posted by freedompeace View Post
It's there /:

Code:
class CGameStats
{
public:
char unknown0[106];
char szLocalNameChangesInKill[106]; //0010
char unknown1[102];
__int8 iKills; //002C
__int8 iDeaths; //0030
char unknown2[404];
__int8 iHeadShots; //0060
};
but the name is different O.o
Forgive me if im wrong, But im bad with classes lol
CGameStats* goToStats;

CGameStats is the name of the class
goToStats is the name of this instance of the class.

It's right. Something about it isn't though. I'm not sure if its the assignment of the variable crashing , or using it causing the crash. Either way, it's crashing ! D: !

( 'GameStatistics->goToInfoClass->goToSomething->bIsAlive' is what i use.)
WOW way confusing
Quote Originally Posted by Casey95 View Post
WOW way confusing
Doesn't solve problem ):
Have you tried pointing to one class at a time and seeing if tis crashing?
I found i crashed if i pointed to a certin class.
Quote Originally Posted by ac1d_buRn View Post
Have you tried pointing to one class at a time and seeing if tis crashing?
I found i crashed if i pointed to a certin class.
Combat Arms is currently patching, but thanks, I'll try that
[php]Main *pInfo = (Main*) dwInfoclass;//the addy

if(pInfo->goToInfoClass->goToWepInfo->iGrenadesLeft||pInfo->goToInfoClass->goToWepInfo->iPrimary||pInfo->goToInfoClass->goToWepInfo->iSecondary||pInfo->goToInfoClass->goToWepInfo->iBackPackA)
/*Draw a box with ammo informations*/;
//blablabla all the other things..[/php]

thats how i use it
Quote Originally Posted by kotentopf View Post
[php]Main *pInfo = (Main*) dwInfoclass;//the addy

if(pInfo->goToInfoClass->goToWepInfo->iGrenadesLeft||pInfo->goToInfoClass->goToWepInfo->iPrimary||pInfo->goToInfoClass->goToWepInfo->iSecondary||pInfo->goToInfoClass->goToWepInfo->iBackPackA)
/*Draw a box with ammo informations*/;
//blablabla all the other things..[/php]

thats how i use it
Is my player structure outdated? O: !
Quote Originally Posted by freedompeace View Post
Is my enemy structure outdated? O: !
Gellin released an update on it, But all that still works.
Quote Originally Posted by ac1d_buRn View Post


Gellin released an update on it, But all that still works.
Huh. So it must be just me ~.~

See how nooby I am? xD
Posts 115 of 25 · Page 1 of 2

Post a Reply

Tags for this Thread

None

Need help?