m_iScore resource
This commit is contained in:
parent
54a22a1906
commit
fe9229baa1
@ -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;
|
||||
|
@ -17,6 +17,7 @@ public:
|
||||
int GetMaxBuffedHealth(CachedEntity* player);
|
||||
int GetClass(CachedEntity* player);
|
||||
int GetTeam(int idx);
|
||||
int GetScore(int idx);
|
||||
|
||||
int entity;
|
||||
};
|
||||
|
Reference in New Issue
Block a user