GetFuel
exports["RiP-Fuel"]:GetFuel(vehicle)
This function returns the vehicle's fuel level
Arguments
Name | Type | Optional | Explenation |
---|---|---|---|
vehicle | No | Vehicle to get fuel level |
Returned Integer
The action returns the vehicle's fuel level.
Example
local vehicle = ESX.Game.GetVehicleInDirection()
if DoesEntityExist(vehicle) then
local fuel = exports["RiP-Fuel"]:GetFuel(vehicle)
if fuel then
print("Fuel level: "..fuel)
end
end