SA-MP Forums Archive
What would be the best time in ms for mileage? - 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: What would be the best time in ms for mileage? (/showthread.php?tid=511610)



What would be the best time in ms for mileage? - Luis- - 06.05.2014

Well, I have a timer which increments the vehicle mileage, what i'd like to know is how long in milliseconds should I have the timer.

And also, how do I know if i've done one mile?


Re: What would be the best time in ms for mileage? - RajatPawar - 06.05.2014

I'd recommend a 4 - 5 second timer. The main problem is there is a scope for mistake due to the difference between displacement and distance. Since mileage considers the latter, you should go in for what I suggested. Correct me if I am wrong. Assuming you calculate the distance using the point formula and NOT speed time method..


Re: What would be the best time in ms for mileage? - Luis- - 06.05.2014

Alright thanks.

Another question which is related to this. Would it work like this; the faster I go, the quicker the fuel decrements and the mileage increments?


Re: What would be the best time in ms for mileage? - RajatPawar - 06.05.2014

Usually, yes! But not always - you could be driving at 80 km/hr on an inclined 60° mountainside, which would register a LOT of mileage on a normal script, but the truth is, you have only moved (mountainside_length * cos60) units. Fuel is in that matter a kind of scalar, doesn't matter how, when and where - you speed up and it gets used up.