07.02.2011, 15:47
How i can set timer for command. I lont to put timer on this command /givearmour when one player heal after 2 minutes to can heal again
//On Top
new HealedPlayerRecently[MAX_PLAYERS];
public OnGameModeInit()
{
SetTimer("HealedPlayerRecently",120000,1);
return 1;
}
//Put this in your /heal command
HealedPlayerRecently[playerid] = 1;
forward HealedPlayerRecent();
public HealedPlayerRecent()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(HealedPlayerRecently[i] == 1)
{
HealedPlayerRecently[i] = 0;
}
}
}