14.04.2017, 12:35
Quote:
Hmmmm,can anybody send me an example?I can't get it to work,....
|
Код:
new raceTimer[MAX_PLAYERS]; new raceTime[MAX_PLAYERS]; forward CountSeconds (playerid); public CountSeconds (playerid) { raceTime[playerid]++; return 1; }
Код:
raceTimer[playerid] = SetTimerEx("CountSeconds", 1000, true, "i", playerid);
Код:
KillTimer (raceTimer[playerid]); new string[256]; format (string, sizeof(string), "ID %i took %i seconds to complete the race!", playerid, raceTime[playerid]); SendClientMessageToAll (-1, string); raceTime[playerid] = 0;