Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void CEsp::SpecList()
- {
- IClientEntity *pLocal = hackManager.pLocal();
- RECT scrn = Render::GetViewport();
- int AC = 0;
- // Loop through all active entitys
- for (int i = 0; i < Interfaces::EntList->GetHighestEntityIndex(); i++)
- {
- // Get the entity
- IClientEntity *pEntity = Interfaces::EntList->GetClientEntity(i);
- player_info_t pinfo;
- Render::Text(scrn.left, (scrn.bottom / 2 - 16), Color(71, 91, 23, 244), Render::Fonts::Watermark, "Spectating me:");
- // The entity isn't some laggy peice of shit or something
- if (pEntity && pEntity != pLocal)
- {
- if (Interfaces::Engine->GetPlayerInfo(i, &pinfo) && !pEntity->IsAlive() && !pEntity->IsDormant())
- {
- HANDLE obs = pEntity->GetObserverTargetHandle();
- if (obs)
- {
- IClientEntity *pTarget = Interfaces::EntList->GetClientEntityFromHandle(obs);
- player_info_t pinfo2;
- if (pTarget)
- {
- if (Interfaces::Engine->GetPlayerInfo(pTarget->GetIndex(), &pinfo2))
- {
- char buf[255]; sprintf_s(buf, "%s", pinfo.name, pinfo2.name);
- RECT TextSize = Render::GetTextSize(Render::Fonts::ESP, buf);
- //Render::Clear(scrn.left, (scrn.bottom / 3) + (16 * AC), 260, 16, Color(0, 0, 0, 140));
- //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:");
- 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);
- AC++;
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement