Hello guys,
I am having a problem with my code. The set_task is executing when it should not, randomly.
From my understanding, the code should execute every 10 minutes 4 times.
Code:
public client_putinserver(id)
{
set_task(600.0, "creditSystem", id, _, _, "a", 4)
}
public creditSystem(id)
{
static team
team = fm_cs_get_user_team(id)
if (team == FM_CS_TEAM_SPECTATOR || team == FM_CS_TEAM_UNASSIGNED)
return PLUGIN_HANDLED;
else
{
if (is_user_connected(id))
{
zp_colored_print(id, "^x04[GDL] ^x01Ganaste un^x03 CREDITO ^x01!")
g_creditos[id]++
}
}
return PLUGIN_HANDLED;
}
thanks and merry christmas