Guest User

Untitled

a guest
Jun 24th, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. void CG_Draw2D( ) // Begin Visual ESP
  2. {
  3. g_pAPI->GetCGame( )->GetExports( )->CG_Draw2D( );
  4.  
  5. int playerIndex;
  6. vec2_t dotPos, dotSize;
  7. rgba_t dotColor = { 0, 0, 0 , 1 };
  8. playerContainer_t *currentPlayer = g_pFW->GetPlayers( )->GetContainer( playerIndex );
  9.  
  10. for( playerIndex = 0; playerIndex < MAX_PLAYERS; playerIndex++ )
  11. {
  12.  
  13. if( !currentPlayer || !currentPlayer->isValid )
  14. continue; // break out of the loop immediatley if the parsed entity is not valid ( or does not exist )
  15.  
  16. if( g_pFW->GetDraw2D( )->WorldToScreen( currentPlayer->bones[BONE_EYES].origin, dotPos ) )
  17. {
  18. dotSize[0] = dotSize[1] = 5;
  19. g_pFW->GetDraw2D( )->DrawBox( ALGN_CENTERMIDDLE, dotPos, dotSize, dotColor );
  20.  
  21. if( currentPlayer->isEnemy )
  22. {
  23. dotColor[0] = 1;
  24. }
  25. else
  26. {
  27. dotColor[1] = 1;
  28. }
  29.  
  30. dotSize[0] = dotSize[1] = 3;
  31. g_pFW->GetDraw2D( )->DrawBox( ALGN_CENTERMIDDLE, dotPos, dotSize, dotColor );
  32.  
  33. rgba_t textColor = { 1, 1, 1 , 1 };
  34.  
  35. if( !currentPlayer->isVisible )
  36. textColor[3] = 0.5f;
  37.  
  38. vec2_t textPos;
  39.  
  40. Vec3Copy( dotPos, textPos );
  41.  
  42. textPos[1] -= 24;
  43.  
  44. g_pFW->GetDraw2D( )->DrawString( ALGN_CENTERTOP,
  45. textPos, textColor, g_pAPI->GetCgs( )->media.attackerFont,
  46. "%s", currentPlayer->name );
  47. }
  48.  
  49. //...
  50. }
  51. //...
  52. } // End Visual ESP
Add Comment
Please, Sign In to add comment