Client

Exports - Clientside

GetVehicleFuel

Parameters vehicle - number - A vehicle handle

Returns fuelLevel - number - Vehicles fuel level

local fuelLevel = exports.msk_fuel:GetVehicleFuel(vehicle)

-- You can also use
local fuelLevel = Entity(vehicle).state.fuel

SetVehicleFuel

Parameters vehicle - number - A vehicle handle fuelLevel - number - Vehicles new fuel level

exports.msk_fuel:SetVehicleFuel(vehicle, fuelLevel)

-- You can also use
Entity(vehicle).state.fuel = fuelLevel

GetVehicleFuelType

Parameters vehicle - number - A vehicle handle

Returns fuelType - string - Vehicles fuel type

local fuelType = exports.msk_fuel:GetVehicleFuelType(vehicle)

-- You can also use this:
local fuelType = Entity(vehicle).state.fuelType

GetVehicleMaxFuel

Parameters vehicle - number - A vehicle handle

Returns maxFuel - number - Vehicles max fuel level

local maxFuel = exports.msk_fuel:GetVehicleMaxFuel(vehicle)

-- You can also use this:
local maxFuel = Entity(vehicle).state.maxFuel

SetVehicleMaxFuel

Parameters vehicle - number - A vehicle handle maxFuel - number - Vehicles new max fuel level

exports.msk_fuel:SetVehicleMaxFuel(vehicle, maxFuel)

-- You can also use this:
Entity(vehicle).state.maxFuel = maxFuel

SetEngineRepaired

Repaires the Engine if the player refilled with the wrong fuel type

Parameters vehicle - number - A vehicle handle

exports.msk_fuel:SetEngineRepaired(vehicle)

Last updated