CrackAndLoad



 
HomePortalCalendarFAQSearchMemberlistUsergroupsRegisterLog in
Welcome To CrackAndLoad! Please Be Active And Read Our Forum Rules To Avoid Get Banned! Enjoy !

Share | 
 

 Crossfire perfect 2d box esp

View previous topic View next topic Go down 
AuthorMessage
CodeBlack

HYPER MODERATOR

avatar

Posts : 75
Post/Message Points : 175
Thanks : 26
Join date : 2012-12-01

PostSubject: 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




Quote :

This forum requires that you wait 60 seconds between sending private messages. Please try again in 1 seconds.

=====================================================================
Quote :
Coder [✔️]

Visual Basic [✔️]

Visual C++ [✔️]

Programming [✔️]

Cabal Hack [✔️]

WarRock Hack [✔️]

USF HACK [✔️]

CF Hack

SF Hack

=====================================================================
Teacher's
GLenox
DOOP



CodeBLacK CNL Moderator
Back to top Go down
View user profile
Unknown Gamer

CODE MAKER

avatar

Posts : 9
Post/Message Points : 22
Thanks : 3
Join date : 2012-12-30

PostSubject: Re: Crossfire perfect 2d box esp   Sun Dec 30, 2012 12:18 am

Thnkz For Posting


Back to top Go down
View user profile
Xtianzkeel

HYPER MODERATOR

avatar

Posts : 57
Post/Message Points : 132
Thanks : 4
Join date : 2012-12-16

PostSubject: Re: Crossfire perfect 2d box esp   Wed Jan 02, 2013 4:24 pm

Nice codeblack! galing ah
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: Crossfire perfect 2d box esp   

Back to top Go down
 

Crossfire perfect 2d box esp

View previous topic View next topic Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
CrackAndLoad :: Computer Programming :: C++ Programming-