Skip to main content

SetFuel

exports["RiP-Fuel"]:SetFuel(vehicle, fuel) 

This function sets a vehicle's fuel level to a given amount

Arguments

NameTypeOptionalExplenation
vehicleNoVehicle to set fuel level
fuelInteger/DecimalNoFuel level

Example

local vehicle = ESX.Game.GetVehicleInDirection()

if DoesEntityExist(vehicle) then
exports["RiP-Fuel"]:SetFuel(vehicle, 100.0)
end