FAQ

chevron-rightHow to do localizationhashtag

A detailed description is available. Editing localization files

chevron-rightHow can I integrate my fuel?hashtag

Check modules/fuel/your_fuel_name/client.lua and follow the inventory documentation

---@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
chevron-rightHow can i integrate my vehiclekeys script ?hashtag

Check modules/vehiclekeys/your_vehiclekey_name/client.lua and follow the vehicle keys documentation

---@diagnostic disable: duplicate-set-field
local resourceName = "your_vehiclkey_folder_name"
if GetResourceState(resourceName) == 'missing' then return end

VehicleKey = VehicleKey or {}

---Gives the player (self) the keys of the specified vehicle.
---@param vehicle number The vehicle entity handle.
---@param plate? string The plate of the vehicle.
---@return nil
VehicleKey.GiveKeys = function(vehicle, plate)
    assert(vehicle, "vehicle is nil")
    assert(DoesEntityExist(vehicle), "vehicle does not exist")
    if not plate then plate = GetVehicleNumberPlateText(vehicle) end

    -- Your Give Key Event/Export
end

-- TODO: Test, documentation of the script is missing

---Removes the keys of the specified vehicle from the player (self).
---@param vehicle number The vehicle entity handle.
---@param plate? string The plate of the vehicle.
---@return nil
VehicleKey.RemoveKeys = function(vehicle, plate)
    assert(vehicle, "vehicle is nil")
    assert(DoesEntityExist(vehicle), "vehicle does not exist")

    if not plate then plate = GetVehicleNumberPlateText(vehicle) end

    -- Your Remove Key Event/Export
end

VehicleKey.GetResourceName = function()
    return resourceName
end

return VehicleKey
chevron-rightHow can i integrate my target script ?hashtag

Check modules/target/your_target_name/client.lua and follow other folder and your target documentation

chevron-rightHow can i integrate my notify script ?hashtag

Check modules/notify/your_target_name/client.lua and follow other folder and your notify documentation

chevron-rightHow can i integrate my progress bar script ?hashtag

Check modules/progressbar/your_target_name/client.lua and follow other folder and your progressbar documentation

chevron-rightWhere are the config files?hashtag

All config files are inside config/ folder