Ayo !!!! Code For 2D Boxes.

Posts 14 of 4 · Page 1 of 1
Ayo !!!! Code For 2D Boxes.
void CESP:raw2DPlayerBox( 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 ) );
}
}

Please Try This Code If It Work .
Fail thread is fail
why!!! this thread fail!
this is old, leeched, doesnt work and is broken in many places.\

someone ban the people who leech these stupid codes.
Posts 14 of 4 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?