Guest User

Untitled

a guest
May 25th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.66 KB | None | 0 0
  1. void CEsp::NameESP()
  2. {
  3. for(int i = 0; i < cgs->maxPlayers; i++) {
  4. centity_t pEntity = cg_entities[i];
  5. clientInfo_t pPlayer = clientinfo[i];
  6.  
  7. if((pEntity.clientNum == cg->clientNum))
  8. continue;
  9.  
  10. if((!pEntity.currentValid))
  11. continue;
  12.  
  13. if((pEntity.eType != TYPE_HUMAN) || (!pEntity.isAlive))
  14. continue;
  15.  
  16. vec3_t vOutHead;
  17. Math.GetPlayerTag(Math.ASM_RegisterTag("j_head", 1, 7), &cg_entities[i], vOutHead);
  18. float * TeamColor =(clientinfo[cg->clientNum].Team != pPlayer.Team || pPlayer.Team == TEAM_ENEMIES ? colGreen : colRed);
  19. float fScreenXhead, fScreenYhead;
  20.  
  21. if(Math.WorldToScreen(vOutHead, &fScreenXhead, &fScreenYhead) && Math.WorldToScreen(pEntity.lerpOrigin, &fScreenXfeet, &fScreenYfeet)) {
  22. Drawing.DrawString(fScreenXhead,fScreenYhead - 5, consoleFont, 1.1f, TeamColor, pPlayer.Name);
  23. /* if (clientinfo[cg->clientNum].Team != pPlayer.Team || pPlayer.Team == TEAM_ENEMIES) // Enemy ESP
  24. {
  25. Drawing.DrawString(fScreenXhead,fScreenYhead - 5, consoleFont, 1.1f, TeamColor, pPlayer.Name);
  26. }
  27. if (clientinfo[cg->clientNum].Team == pPlayer.Team && pPlayer.Team != TEAM_FFA) // Friend ESP
  28. {
  29. Drawing.DrawString(fScreenXhead,fScreenYhead - 5, consoleFont, 1.1f, TeamColor, pPlayer.Name);*/
  30. }
  31. }
  32. }
  33. }
Add Comment
Please, Sign In to add comment