Advertisement
eeli

Untitled

Nov 25th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.64 KB | None | 0 0
  1. void CEsp::SpecList()
  2. {
  3.  
  4. IClientEntity *pLocal = hackManager.pLocal();
  5.  
  6. RECT scrn = Render::GetViewport();
  7. int AC = 0;
  8.  
  9.  
  10. // Loop through all active entitys
  11. for (int i = 0; i < Interfaces::EntList->GetHighestEntityIndex(); i++)
  12. {
  13. // Get the entity
  14. IClientEntity *pEntity = Interfaces::EntList->GetClientEntity(i);
  15. player_info_t pinfo;
  16.  
  17. Render::Text(scrn.left, (scrn.bottom / 2 - 16), Color(71, 91, 23, 244), Render::Fonts::Watermark, "Spectating me:");
  18.  
  19.  
  20. // The entity isn't some laggy peice of shit or something
  21. if (pEntity && pEntity != pLocal)
  22. {
  23.  
  24. if (Interfaces::Engine->GetPlayerInfo(i, &pinfo) && !pEntity->IsAlive() && !pEntity->IsDormant())
  25. {
  26.  
  27. HANDLE obs = pEntity->GetObserverTargetHandle();
  28.  
  29. if (obs)
  30. {
  31. IClientEntity *pTarget = Interfaces::EntList->GetClientEntityFromHandle(obs);
  32. player_info_t pinfo2;
  33. if (pTarget)
  34. {
  35. if (Interfaces::Engine->GetPlayerInfo(pTarget->GetIndex(), &pinfo2))
  36. {
  37. char buf[255]; sprintf_s(buf, "%s", pinfo.name, pinfo2.name);
  38. RECT TextSize = Render::GetTextSize(Render::Fonts::ESP, buf);
  39. //Render::Clear(scrn.left, (scrn.bottom / 3) + (16 * AC), 260, 16, Color(0, 0, 0, 140));
  40. //Render::Text(scrn.left, (scrn.bottom / 2 - 16), pTarget->GetIndex() == pLocal->GetIndex() ? Color(240, 70, 80, 255) : Color(255, 255, 255, 0), Render::Fonts::ESP, "Spectating me list:");
  41. Render::Text(scrn.left, (scrn.bottom / 2) + (16 * AC), pTarget->GetIndex() == pLocal->GetIndex() ? Color(240, 70, 80, 255) : Color(255, 255, 255, 0), Render::Fonts::ESP, buf);
  42. AC++;
  43. }
  44. }
  45. }
  46. }
  47. }
  48. }
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement