Old 05-11-2010, 05:19 PM   #1
cancoder
Guest
 
Posts: n/a

Default does Player-Info-Pointer work ???


this is a pointer to the player_info_t - array.

info: not hud_player_info_t.

the size of the structure in the hl1-sdk differs from the one counter-strike uses. therefore i wrote a function to solve this problem:

Code:
DWORD dwPlayerInfo;

dwPlayerInfo = (DWORD)GetModuleHandle("hw.dll") + 0x11CFC58;

player_info_t *PlayerInfo(unsigned int i)
{
return (player_info_t *)(dwPlayerInfo + (i * 0x250));
}you could also add 24 bytes to the struct in the sdk:

Code:
typedef struct player_info_s
{
...
byte unknown[24];
} player_info_t;

player_info_t *pPlayerInfo;

pPlayerInfo = (player_info_t *)((DWORD)GetModuleHandle("hw.dll") + 0x11CFC58);

...
i = oEngine.GetLocalPlayer()->index;
DrawHudString(x, y, 255, 255, 255, pPlayerInfo[i].name);
...here is an simple esp for example:

Code:
enum
{
CS_NOTEAM,
CS_COUNTER,
CS_TERROR
};

int TeamNumber(unsigned int i)
{
char *m = PlayerInfo(i)->model;
if (m[0] == 'u' || m[1] == 's' || m[0] == 's' || m[1] == 'i' || m[0] == 'v')
return CS_COUNTER;
if (m[0] == 't' || m[0] == 'l' || m[0] == 'g' || m[0] == 'a')
return CS_TERROR;
return CS_NOTEAM;
}


// hud_redraw
iTeam = TeamNumber(i);

float* origin[3]
VectorCopy(PlayerInfo(i)->prevgaitorigin,origin);
CalcScreen(origin,vecScreen);
x=vecScreen[0];
y=vecScreen[1];

if (iTeam)
{
if (iTeam == CS_COUNTER)
oEngine.pfnTintRGBA(x, y, 2, 2, 0, 0, 255, 200);
else if (iTeam == CS_TERROR)
oEngine.pfnTintRGBA(x, y, 2, 2, 255, 0, 0, 200);
}

Does it work wallhack Esp For Dokee or 175pt???
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Last edited by cancoder; 05-11-2010 at 05:46 PM.
Re: does Player-Info-Pointer work ???
Old 05-11-2010, 09:07 PM   #2
Administrator
 
h4c0r-BG's Avatar
 
Join Date: Dec 2009
Posts: 648
Thanks: 64
Thanked 378 Times in 124 Posts
Rep Power: 18
h4c0r-BG has disabled reputation
h4c0r-BG is offline
Default

Why not try it out yourself first?

Every good coder should try some stuff himself when goes up digging in a game engine.
__________________
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: does Player-Info-Pointer work ???
Old 05-17-2010, 02:03 PM   #3
cancoder
Guest
 
Posts: n/a
Default

[code:]
(DWORD)GetModuleHandle("hw.dll")

can't work ..
please use instand
[code:]
int HW_DecodeDLL( DWORD dwBaseAddr, char **szDllName, DWORD *ExportTable, int iSize )
{
Handle_hw_dll = dwBaseAddr;
}

 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Last edited by cancoder; 05-17-2010 at 04:07 PM.
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.5.0 RC2