SA-MP Forums Archive
Realistic fuel system - 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: Realistic fuel system (/showthread.php?tid=508065)



Realistic fuel system - Luis- - 20.04.2014

Hey guys! Been wanting to get my fuel system to work as realistic as I can!

What i'd like to know is how can I work out MPG, Fuel Capacity and getting the vehicle mileage.

Any help would be greatly appreciated, thanks!


Re: Realistic fuel system - arakuta - 20.04.2014

You can use physical principles for calculate mileage.

For example, get two positions in a second, when a player is driving.

If the distance between points was 150, so he ran 150 meters. (Assuming that 1 distance equal 1 meter)

The problem would be when a player does curves, but you can use other math principles such as tangent to a circle.


Re: Realistic fuel system - Luis- - 21.04.2014

I know that, I just wanted to see some calculations that I could use.