Quote:
Originally Posted by Schneider
You can create a new variable at the top of the script for each player which stores the tickcount at the moment the player starts racing:
pawn Код:
new StartTick[MAX_PLAYERS];
Then when the countdown is done, and the GoGoGo-text is showing you store the tickcount:
pawn Код:
StartTick[i] = GetTickCount();
When the player reaches the checkpoint you create a new temporarily variable and get the current tick count, then calculate the minutes/seconds/milliseconds:
pawn Код:
//OnPlayerEnterRaceCheckpoint new RaceTime = (GetTickCount() - StartTick[playerid]); new str[128]; format(str, 128, "You finished in %02d:%02d.%03d", RaceTime/60000, (RaceTime%60000)/1000, (RaceTime%1000)); SendClientMessage(playerid, -1, str);
You don't need that timer (test(playerid))
|
You are god!! Thx u!!! it working!! THXX!!!!!!!!