SetFuel
exports["RiP-Fuel"]:SetFuel(vehicle, fuel)
This function sets a vehicle's fuel level to a given amount
Arguments
Name | Type | Optional | Explenation |
---|---|---|---|
vehicle | No | Vehicle to set fuel level | |
fuel | Integer/Decimal | No | Fuel level |
Example
local vehicle = ESX.Game.GetVehicleInDirection()
if DoesEntityExist(vehicle) then
exports["RiP-Fuel"]:SetFuel(vehicle, 100.0)
end