open.mp forum
[Pawn] record time - Printable Version

+ open.mp forum (https://forum.open.mp)
-- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3)
--- Forum: Pawn Scripting (https://forum.open.mp/forumdisplay.php?fid=10)
--- Thread: [Pawn] record time (/showthread.php?tid=2248)



record time - Zow - 2021-11-12

PHP Code:
main() { 

SetTimer("update"10true);

}



ReturnTime(timevariable)

//Used in the OnPlayerEnterRaceCheckpoint code.

{

? ? new 
milliseconds timevariablestring[20];

? ? while(
milliseconds 999)

? ? {

? ? ? ? 
//Add to the seconds variable

? ? ? ? milliseconds milliseconds 10;

? ? ? ? 
//Take away 10 from the ms variable

? ? }

? ? 
format(stringsizeof(string), "%05d"milliseconds);

? ? return 
string;







Quote:00588

00589

00590

00591

00592

00593

00594

00595

00596

00597

00598

00599



I just want them to be like this?https://youtu.be/v62Gt38ngzM?t=28

[Image: unknown.png]



7.865 second



Any help please


RE: record time - Y_Less - 2021-11-18

Divide by 60000 for minutes, mod by 60000 for milliseconds, divide that by 1000 for seconds.