Kilometers - 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: Kilometers (
/showthread.php?tid=158887)
Kilometers -
whitedragon - 11.07.2010
How calulate the drived km in game?
Re: Kilometers -
DeathOnaStick - 11.07.2010
Just use OnPlayerKeyStateChange when W is pressed it saves one position. When A, S, D is pressed or W is released it checks how far you drove. When A or D is pressed you need it to be called faster, due to the fact that you dont have a line that you can just calculate the length from. I hope this helps you a bit.
Cheers.
Re: Kilometers -
whitedragon - 12.07.2010
Yes but how i will take that ?

because when it's add to less time it's not normal