Originally Posted by
qwerty01
the world to screen function crashes b/c it reads it >.>
Anything magicman posted was crap(wrong wrong and wrong I dont even think he checked it cuz its all wrong)..... use what i posted on here and check the pointers and make sure they are not null.
Code:
class PlayerInfo
{
public:
__int32 Unknown0; //0000
__int32 index; //0004
__int32 Unknown2; //0008
__int32 Unknown3; //000C
char Name[12]; //0010
char unknown5[12];
_Object* obj; //0028
char unknown44[68]; //0x002C
__int32 Team; //0x0070
__int32 idk;
__int8 IsDead; //0078
};
class _Object
{
public:
char Pad[4];
D3DXVECTOR3 origin;
};
typedef PlayerInfo* (__thiscall *lpGetPlayerByIndex)(unsigned long ulThis,int index, int unk);
lpGetPlayerByIndex GetPlayerByIndex;//3715D9A0
Code:
GetPlayerByIndex = (lpGetPlayerByIndex)(0x3715D9A0);
unsigned long ulThis = *(unsigned long*)(0x377F3E68);
for ( int i = 0; i < 16; i++ )
{
PlayerInfo* pPlayer = GetPlayerByIndex( ulThis,i,0);
if(pPlayer != 0 && pPlayer->obj != 0 && pPlayer->IsDead ==0){
pPlayer->obj->origin.x