CodeBlack
Posts : 75 Post/Message Points : 175 Thanks : 26 Join date : 2012-12-01
| Subject: Crossfire perfect 2d box esp Fri Dec 28, 2012 9:36 am | |
| Believe it or not, it took longer to figure out than i thought (at the time) - Code:
-
void CESP::Draw2DPlayerBox( CF_Player *pPlayer, DWORD drawColor ) { if( !pPlayer ) return;
if( !pPlayer->Object ) return;
if( !g_Engine.GetClient() ) return;
LTVector vCenter, vFoot, vHead;
//this is the centered position if( g_Engine.GetClient()->GetObjectPos( pPlayer->Object, &vCenter ) != LT_OK ) return;
//foot (bottom) if( g_Engine.GetClient()->GetObjectBoxMin( pPlayer->Object, vFoot ) != LT_OK ) return;
//head (top) if( g_Engine.GetClient()->GetObjectBoxMax( pPlayer->Object, vHead ) != LT_OK ) return;
//center the positions for 2d boxes vFoot.x = vCenter.x; vFoot.z = vCenter.z; vHead.x = vCenter.x; vHead.z = vCenter.z;
LTVector vPlayerFootScreen, vPlayerHeadScreen;
if( g_Engine.LTWorldToScreen( vFoot, vPlayerFootScreen ) && g_Engine.LTWorldToScreen( vHead, vPlayerHeadScreen ) ) { float w = ( vPlayerFootScreen.y - vPlayerHeadScreen.y ) / 4;
g_Engine.OutlineRGBA( vPlayerHeadScreen.x - w, vPlayerHeadScreen.y, w * 2, ( vPlayerFootScreen.y - vPlayerHeadScreen.y ), 1.0f, RED( drawColor ), GREEN( drawColor ), BLUE( drawColor ), ALPHA( drawColor ) ); } } For real Coder Only |
|
Unknown Gamer
Posts : 9 Post/Message Points : 22 Thanks : 3 Join date : 2012-12-30
| Subject: Re: Crossfire perfect 2d box esp Sun Dec 30, 2012 12:18 am | |
| |
|
Xtianzkeel
Posts : 57 Post/Message Points : 132 Thanks : 4 Join date : 2012-12-16
| Subject: Re: Crossfire perfect 2d box esp Wed Jan 02, 2013 4:24 pm | |
| Nice codeblack! galing ah |
|
Sponsored content
| Subject: Re: Crossfire perfect 2d box esp | |
| |
|