Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void CG_Draw2D( ) // Begin Visual ESP
- {
- g_pAPI->GetCGame( )->GetExports( )->CG_Draw2D( );
- int playerIndex;
- vec2_t dotPos, dotSize;
- rgba_t dotColor = { 0, 0, 0 , 1 };
- playerContainer_t *currentPlayer = g_pFW->GetPlayers( )->GetContainer( playerIndex );
- for( playerIndex = 0; playerIndex < MAX_PLAYERS; playerIndex++ )
- {
- if( !currentPlayer || !currentPlayer->isValid )
- continue; // break out of the loop immediatley if the parsed entity is not valid ( or does not exist )
- if( g_pFW->GetDraw2D( )->WorldToScreen( currentPlayer->bones[BONE_EYES].origin, dotPos ) )
- {
- dotSize[0] = dotSize[1] = 5;
- g_pFW->GetDraw2D( )->DrawBox( ALGN_CENTERMIDDLE, dotPos, dotSize, dotColor );
- if( currentPlayer->isEnemy )
- {
- dotColor[0] = 1;
- }
- else
- {
- dotColor[1] = 1;
- }
- dotSize[0] = dotSize[1] = 3;
- g_pFW->GetDraw2D( )->DrawBox( ALGN_CENTERMIDDLE, dotPos, dotSize, dotColor );
- rgba_t textColor = { 1, 1, 1 , 1 };
- if( !currentPlayer->isVisible )
- textColor[3] = 0.5f;
- vec2_t textPos;
- Vec3Copy( dotPos, textPos );
- textPos[1] -= 24;
- g_pFW->GetDraw2D( )->DrawString( ALGN_CENTERTOP,
- textPos, textColor, g_pAPI->GetCgs( )->media.attackerFont,
- "%s", currentPlayer->name );
- }
- //...
- }
- //...
- } // End Visual ESP
Add Comment
Please, Sign In to add comment