27.03.2015, 17:15
Quote:
Dude , you misunderstood me., when someone type /race , all thw players who type /race will be spawned , I made that , but they can only type /race under the 30 seconds , and after the race is finished again they can type /race .. you thought that after the /race after 30 seconds they can type /race again..
|
Код:
new bool:racestart = false; // if true blocks /race for everybody new bool:timerset = false; // needed for starting timer only once forward RaceTimer(); public RaceTimer() { racestart = true; timerset = false; }
Код:
CMD:race(playerid, params[]) { // test if is valid playerid & params //... if (racestart) SendClientMessage(playerid,-1,"Sorry, race's started!"); if (!timerset) { SetTimer("RaceTimer",30000,false); timerset = true; } // the rest of your command here //... return 1; }
Код:
racestart = false;