Skip to content

General Configuration

General settings are configured in /data/settings.lua.

Options

  • debugMode boolean

  • marker? table — Appearance of the triggering point if target is not enabled

    • type number — Refer to FiveM documentation for markers ID
    • rotation vector3
    • zOffset number
    • color table
      • r number
      • g number
      • b number
      • a number
  • enableLevel boolean — Whether to use the built in leveling system

  • levelUpExp? function ( level: number ) — How the system will calculate the Exp required for the next level up

  • craftingAnim? table — Animation when crafting, keep nil to disable animation

    • dict string
    • clip string
  • notify function — Change it to your preferred notification system, default using ox_lib notification

  • platePattern string — Pattern of the plate of newly crafted vehicles, refer to ox_lib documentation for the pattern

OX_CORE Compatability

If you are using ox_core, the platePattern setting is only supported on version 1.5.8 or later. For earlier versions, the system will instead use the pattern defined in ox:plateFormat.

  • vehicleAdded function ( source:number, itemName: string, platestring ) — Triggered on sesrver side when a vehicle is crafted, useful for giving car key

Default settings

lua
local settings = {
    marker = {
        type = 27,
        rotation = vec3(0.0, 0.0, 0.0),
        zOffset = 0.9,
        color = { r = 255, g = 0, b = 0, a = 100 },
    },

    enableLevel = true,
    levelUpExp = function(level)
        return math.floor((level * 100))
    end,

    craftingAnim = {
        dict = 'mini@repair',
        clip = 'fixing_a_ped'
    },

    platePattern = 'AAAA1111',

    vehicleAdded = function(source, itemName, plate)
    if not IsDuplicityVersion() then return end
    -- you can add your custom code here for when a vehicle is added, for example adding car key
    end,

    notify = function(...)
        local arg = {...}
        if IsDuplicityVersion() then
            TriggerClientEvent('ox_lib:notify', arg[1], { type = arg[3], description = arg[2] })
        else
            lib.notify({
                description = arg[1],
                type = arg[2]
            })
        end
    end
}

return settings