Hello, I'm trying to do that if player is in distance for him will be shown counting, but how to set count to 1 if player was in distance and goes away?. And need to do this: if one player is in distance, and counting started for other players in distance this func just don't work.
PHP Code:
public Think(Ent)
{
if (!is_valid_ent(Ent))
return
entity_set_float(Ent, EV_FL_nextthink, get_gametime() + 1.0)
static Count
Count = 1
static id
id = -1
while ((id = find_ent_in_sphere(id, Origin, Distance)) != 0)
{
if (1 <= id <= MaxPlayers && is_user_alive(id))
{
client_print(id, 3, "%d", Count++)
}
}
}