Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #include "MenuElements.hpp"
- class PlayerList : public Element
- {
- protected:
- std::vector<SourceSDK::CBaseEntity*> _ents;
- public:
- PlayerList()
- {
- _ents.clear();
- }
- void Think()
- {
- visible = parent->GetVisible();
- if (!visible) return;
- for (int i=1; i<=64; i++)
- {
- SourceSDK::CBaseEntity* pEnt = (SourceSDK::CBaseEntity*)I::ClientEntityList->GetClientEntity(i);
- if (!pEnt) continue;
- if (pEnt->IsDormant()) continue;
- _ents.push_back(pEnt);
- }
- }
- void Paint()
- {
- if (!visible) return;
- /// DRAW HERE
- }
- std::vector<SourceSDK::CBaseEntity*> GetEntities() { return _ents; }
- void AddEntity(SourceSDK::CBaseEntity* pEntity) { _ents.push_back(pEntity); }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement