[HELP]How to make a timer.works as per cmd
#9

If you give us the /race command, I will try to adjust it to your question.
Otherwise, you should use foreach command after the race is finished to reset all race players race command variables for ex:
pawn Код:
cmd:race(playerid, params[])
{
     if(InRace[playerid]) return SendClientMessage(playerid, COLOR_WHITE, "You are racing, wait untill its finished");
     InRace[playerid] = 1;
}
when race is finished:
Код:
foreach(Player, playerid)
{
     InRace[playerid] = 0;
}
If you them to be able to use /race only for first 30 seconds, then make 2 command
1) startrace (or any other way to start a race, a timer maybe)
2) joinrace
while start race will make timer for 30 seconds to be able to join races. if the global timer ended, return the variable who let people join the race to 0;

Thats how i understand the problem you are having, If you want further help send the commnad /race.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)