[HELP]Race Timer - 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)
+--- Thread: [HELP]Race Timer (
/showthread.php?tid=433238)
[HELP]Race Timer -
lolipop123 - 26.04.2013
Hi people,
my english is not soo good but i try to start.
i want to create a race timer who save the time after the last checkpoint. i worked with
new timeMs = ( GetTickCount() - racestart );
new minuten = (timeMs/60000);
timeMs -= (minuten * 60000);
new sekunden = (timeMs/1000);
but often hes >>>skipping(Why. Maybe because SetTimer( ?)<<< a second and on this one
public countdown()
{
new string[50];
second ++;
if(second > 59)
{
Mini ++;
second = 0;
}
format(string, sizeof(string), "Zeit: %02d:%02d",minuten,sekunden);
TextDrawSetString(Textdraw7, string);
TextDrawShowForAll(Textdraw7);
return 1;
}
i dont know how to continue.. i hope anyone can help me
//E
its like this
https://sampforum.blast.hk/showthread.php?tid=133698
but my function is skipping a second for example every 5 seconds
AW: [HELP]Race Timer -
lolipop123 - 26.04.2013
Maybe its because the SetTimer" ?