SA-MP Forums Archive
Mileage, How ? - 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: Mileage, How ? (/showthread.php?tid=490510)



Mileage, How ? - anou1 - 26.01.2014

Hi,

How should I proced to do a system of mileage ?

I want a system that will be shown in a textdraw, and updated in real time if I'm in a vehicle.

Thank you !


Re: Mileage, How ? - Shetch - 26.01.2014

Set up a speedometer and get the speed of the player every second.
Then divide the speed by 60 and then by 60 again so you get the speed in KMS(kilometers per second).
Add the result to the mileage variable and you're done.