Why this code work all palyers?
Code:
public Action:Timer_Cloak(Handle:hTimer, any:client)
{
if(cEnable && cInfCloak && IsClientInGame(client) && IsValidEntity(client) && IsClientConnected(client))
{
new cond = GetEntProp(client, Prop_Send, "m_nPlayerCond");
if(cond & 16)
SetEntPropFloat(client, Prop_Send, "m_flCloakMeter", 100.0);
}
tCloak[client] = CreateTimer(0.1, Timer_Cloak, client);
}
public Action:Timer_Cloak_Regen(Handle:hTimer, any:client)
{
if(cEnable && cRegenCloak && IsClientInGame(client) && IsValidEntity(client) && IsClientConnected(client))
{
new cond = GetEntProp(client, Prop_Send, "m_nPlayerCond");
new health = GetClientHealth(client);
if(cond & 16 && health < 125)
SetEntityHealth(client, health + cRegenCloakAmount);
}
tCloak2[client] = CreateTimer(cRegenCloakRate, Timer_Cloak_Regen, client);
}