Timer help
#1

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
Reply
#2

pawn Код:
//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;

        }
    }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)