GetTickCount - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: GetTickCount (
/showthread.php?tid=162304)
GetTickCount -
Agent Smith - 22.07.2010
I have this /stopwatch command but GetTickCount returns in millseconds. Anyway to change it from millseconds to seconds?
Re: GetTickCount -
Яσскѕтая - 22.07.2010
If you search somewhere there is a useful snippet or something that converts milliseconds to seconds.
Re: GetTickCount -
Fj0rtizFredde - 22.07.2010
Im not sure but try to add *1000 beacuse 1sec is 1000ms
Re: GetTickCount -
bigcomfycouch - 22.07.2010
Divide by 1000, don't multiply.
Re: GetTickCount -
GaGlets(R) - 22.07.2010
Just add *1000
10*1000 = 10 seconds
Re: GetTickCount -
Agent Smith - 22.07.2010
Like..
pawn Код:
format(string, 256, "You have stopped the stopwatch on %s. The time was %i",giveplayer, GetTickCount() - stopwatchtime/1000);
?
Re: GetTickCount -
bigcomfycouch - 22.07.2010
I'd use a float so it's 1.234 seconds instead of 1 second
pawn Код:
format(string, 256, "You have stopped the stopwatch on %s. The time was %f",giveplayer, GetTickCount() - stopwatchtime/1000);
Re: GetTickCount -
Agent Smith - 23.07.2010
I tried it but for some reason it didn't do anything :/ Just said 0.000000