You should rename it
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]
Last edited by freedompeace; 09-29-2010 at 12:18 AM.
You should rename it
How would that help? /:
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 };
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
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.
[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
Last edited by freedompeace; 09-29-2010 at 06:57 AM.