Vehicles refuelled in game with the Fuel trucks e.t.c never get completely refuelled. After refuelling, rather than returning a value of 1 when the fuel command is called. They return a value greater than 0.98 and less than 1.
Description
Checks how much fuel is left in the gas tank of a vehicle.
Syntax
fuel vehicle
Parameters:
vehicle: Object
Returns: Number in range 0..1 - 0 (empty tank) to 1 (full tank).
Examples
Example 1
if (fuel vehicle player == 0) then { hint "The vehicle is out of fuel!" };
See also
setFuel · setFuelCargo · getFuelCargo
Community notes
returns
- 1 for units (dead or alive)
- 0 for objNull