24.11.2013, 18:28
Well, personally I believe it would be easier to use a hand-made equation to determine the price. First of all set up a global variable such as "Fuel[MAX_VEHICLES]" and set the fuel when a vehicle spawns and such (to 100 unless you are wanting to make it a saved variable, then set it to the saved variable's number. And in terms of gas prices, use this equation - it should work:
Something similar to that. The 2 stands for how much each gallon/percentage will cost.
pawn Код:
new gas, calculation;
new vehicleid = GetPlayerVehicleID(playerid);
gas = Fuel[vehicleid];
new calcuation = 100-fuel*2;