Advertisement
Guest User

Untitled

a guest
Jan 16th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.75 KB | None | 0 0
  1. void CEsp::SpecList()
  2. {
  3. IClientEntity *pLocal = hackManager.pLocal();
  4.  
  5. RECT scrn = Render::GetViewport();
  6. int ayy = 2;
  7.  
  8. //Border
  9. Render::GradientV(+8, +35 + 500 + (16 * ayy), 240, 311, Color(248, 32, 26, 255), Color(188, 32, 26, 255));
  10. //Main
  11. Render::DrawRect(+13, +61 + 500 + (16 * ayy), 230, 280, Color(45, 43, 40, 255));
  12. // X Button
  13. Render::DrawRect(230, +41 + 500, 15, 15, Color(248, 32, 26, 255));
  14. Render::Outline(230, +41 + 500, 15, 15, Color(0, 0, 0, 255));
  15. Render::Text(235, +41 + 500, Color(255, 255, 255, 255), Render::Fonts::Menu, ("X"));
  16. Render::Text(10 + 5, +41 + 500, Color(255, 255, 255, 255), Render::Fonts::WaterMark, "Spectators");
  17.  
  18. // Loop through all active entitys
  19. for (int i = 0; i < Interfaces::EntList->GetHighestEntityIndex(); i++)
  20. {
  21. // Get the entity
  22. IClientEntity *pEntity = Interfaces::EntList->GetClientEntity(i);
  23. player_info_t pinfo;
  24.  
  25. // The entity isn't some laggy peice of shit or something
  26. if (pEntity && pEntity != pLocal)
  27. {
  28. if (Interfaces::Engine->GetPlayerInfo(i, &pinfo) && !pEntity->IsAlive() && !pEntity->IsDormant())
  29. {
  30. HANDLE obs = pEntity->GetObserverTargetHandle();
  31.  
  32. if (obs)
  33. {
  34.  
  35. IClientEntity *pTarget = Interfaces::EntList->GetClientEntityFromHandle(obs);
  36. player_info_t pinfo2;
  37. if (pTarget)
  38. {
  39. if (Interfaces::Engine->GetPlayerInfo(pTarget->GetIndex(), &pinfo2))
  40. {
  41. char buf[255]; sprintf_s(buf, "%s -> %s", pinfo.name, pinfo2.name);
  42. RECT TextSize = Render::GetTextSize(Render::Fonts::ESP, buf);
  43. Render::Text(14, 555 + (16 * ayy), pTarget->GetIndex() == pLocal->GetIndex() ? Color(240, 70, 80, 255) : Color(255, 255, 255, 255), Render::Fonts::Menu, buf);
  44. ayy++;
  45. }
  46. }
  47. }
  48. }
  49. }
  50. }
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement