10.06.2015, 13:37
Hellu,
As you can see my signature. atm i'm working on map changing gamemode. So i was creating race mission.
let me tell you the actual problem.
I was trying to create a timer system which tells people how much minutes/seconds they took to complete the race. And i create that system correctly lol. but when i test it So it shows me something like this:
Look at the end of the line. its written " (42:55.203) ". the 42 is seconds i think and other miliseconds.
I want it to be like this " minutes then seconds then miliseconds "
Here are the codes:
As you can see my signature. atm i'm working on map changing gamemode. So i was creating race mission.
let me tell you the actual problem.
I was trying to create a timer system which tells people how much minutes/seconds they took to complete the race. And i create that system correctly lol. but when i test it So it shows me something like this:
Look at the end of the line. its written " (42:55.203) ". the 42 is seconds i think and other miliseconds.
I want it to be like this " minutes then seconds then miliseconds "
Here are the codes:
Код:
new rTestcount; public OnPlayerEnterRaceCheckpoint(playerid) { switch(Stats[playerid]) { case 0: { format(string, sizeof(string), "{7077FF}» {FFFF00}%s {7077FF}Has Finshed the Race {FFFF00}[%d%s] [FPS: %d] (%s)", name, place, (place == 1) ? ("st") : (place == 2) ? ("nd") : (place == 3) ? ("rd") : ("th"), pFPS, ConvertTime(GetTickCount() - rTestcount)); SendClientMessageToAll(green, string); rTestcount=GetTickCount(); return 1; } } return 1; } stock ConvertTime(time) { new str[16]; new minutes=time/60000; new ms=time-((minutes)*60000); new seconds=(ms)/1000; ms-=seconds*1000; format(str,sizeof(str),"%02d:%02d.%03d",minutes,seconds,ms); return str; }