PHP Code:
#pragma semicolon 1
#pragma newdecls required
public void OnPluginStart()
{
#if DEBUG
HookEvent("weapon_fire", Event_Weapon_Fire);
#endif
}
public void Event_Weapon_Fire(Event event, const char[] name, bool dontBroadcast)
{
int client = GetClientOfUserId(event.GetInt("userid"));
if(client && !IsFakeClient(client)) CheckStatus();
}
stock void CheckStatus()
{
float buffer;
for(int i = 1, health, count; i <= MaxClients; i++) if(IsClientInGame(i) && GetClientTeam(i) == 2)
{
health = GetEntProp(i, Prop_Send, "m_iHealth");
buffer = GetTempHealth(i);
count = GetEntProp(i, Prop_Send, "m_currentReviveCount");
PrintToChatAll("%N#HP:%d, TEMP:%f, REV:%d,", i, health, buffer, count);
PrintToServer("%N#HP:%d, TEMP:%f, REV:%d,", i, health, buffer, count);
}
}
__________________