m_iScore resource

This commit is contained in:
nullifiedcat 2017-07-29 19:50:30 +03:00
parent 54a22a1906
commit fe9229baa1
2 changed files with 10 additions and 0 deletions

View File

@ -53,6 +53,15 @@ int TFPlayerResource::GetTeam(int idx) {
return *(int*)((unsigned)ent + netvar.res_iTeam + 4 * idx);
}
int TFPlayerResource::GetScore(int idx) {
IClientEntity *ent;
if (idx >= 32 || idx < 1) return 0;
ent = g_IEntityList->GetClientEntity(entity);
if (!ent || ent->GetClientClass()->m_ClassID != RCC_PLAYERRESOURCE) return 0;
return *(int*)((unsigned)ent + netvar.res_iScore + 4 * idx);
}
int TFPlayerResource::GetClass(CachedEntity* player) {
IClientEntity *ent;
int idx;

View File

@ -17,6 +17,7 @@ public:
int GetMaxBuffedHealth(CachedEntity* player);
int GetClass(CachedEntity* player);
int GetTeam(int idx);
int GetScore(int idx);
int entity;
};