questionFAQ

How to do localization

circle-check

How can I integrate my fuel?

circle-check
---@diagnostic disable: duplicate-set-field
local resourceName = "your_fuel_folder_name"
if GetResourceState(resourceName) == 'missing' then return end
Fuel = Fuel or {}

---@description Returns the name of the active fuel resource.
---@return string
Fuel.GetResourceName = function()
    return resourceName
end

---@description Returns the current fuel level of a vehicle.
---@param vehicle number The vehicle entity handle.
---@return number The vehicle fuel level.
Fuel.GetFuel = function(vehicle)
    if not DoesEntityExist(vehicle) then return 0.0 end
    return exports['your_fuel_folder_name']:GetFuel(vehicle)
end

---@description Sets the fuel level of a vehicle.
---@param vehicle number The vehicle entity handle.
---@param fuel number The fuel level to assign.
---@param type? string The fuel type, used only in ti_fuel. (default: RON91)
---@return nil
Fuel.SetFuel = function(vehicle, fuel, type)
    if not DoesEntityExist(vehicle) then return end
    exports['your_fuel_folder_name']:SetFuel(vehicle, fuel)
end

return Fuel

How can i integrate my vehiclekeys script ?

circle-check

How can i integrate my target script ?

circle-check

How can i integrate my notify script ?

circle-check

How can i integrate my progress bar script ?

circle-check

Where are the config files?

circle-check

Last updated