racing system how to take time?
#1

hi, i'm scripting a race system and i just don't know how to take the time that needs a racer from start to finish.
i want that, when someone starts the race the time starts and when a racer finishes there shuold be a message in the chat like
"<name> has finished the race in <minutes>:<seconds>:<milliseconds>".
how would you do it?
Reply
#2

Look at my race script, it should help you.
Reply
#3

ah ok, you made it with a timer and increase a variable each second, yes?
but i want to take the time with milliseconds, so do i need a timer with an intervall of 1 millisecond, uh?
Reply
#4

Quote:
Originally Posted by Cank
ah ok, you made it with a timer and increase a variable each second, yes?
but i want to take the time with milliseconds, so do i need a timer with an intervall of 1 millisecond, uh?
Or you could make a timer in seconds then divide by 1000.
Reply
#5

but then you cant give the time exatly in millieconds, because the function is only called one time each second, or am i wrong?
could you give a short example pls?
Reply
#6

This should help you.
Helped me too.

http://forum.sa-mp.com/index.php?topic=158971.0
Reply
#7

thank you
Reply
#8

Quote:
Originally Posted by Cank
thank you
No problem.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)