I know there's a simple way like this but sometime dont't work.
PHP Code:
public AutoFixHealth()
{
CreateTimer(60.0, Fixhealth, _, TIMER_REPEAT);
}
public Action:Fixhealth(Handle:timer)
{
for (new i = 1; i <= MaxClients; i++)
{
if (IsClientInGame(i) && (GetClientTeam(i) == 2) && !IsFakeClient(i))
{
if(GetEntProp(target, Prop_Data, "m_iHealth") > 100)
{
SetEntProp(target, Prop_Send, "m_iHealth", 100);
}
}
}
}
And this will not work right when player incapacitated,will also set to 100.any help about it? if always check player is stand/incapacitated there will a lot of code.