For the complete documentation index, see llms.txt. This page is also available as Markdown.

Configuration

lib.locale('en')

cfg = {}

-- Enables developer commands (/fake_plate, /plate_remover, /plate_flipper).
cfg.debug = false

-- ============================================================
-- BRIDGE CONFIGURATION
-- ============================================================

-- 'auto' detects QBCore or ESX automatically.
---@type 'auto' | 'qb' | 'esx'
cfg.framework = 'auto'

---@type 'ox_lib' | 'qb' | 'esx' | 'okokNotify' | 'ps-ui'
cfg.notification = 'ox_lib'

---@type 'ox_lib' | 'esx' | 'qb' | 'okokTextUI' | 'jg-textui'
cfg.textUI = 'ox_lib'

-- false = no progress bar, actions are instant.
---@type 'ox_lib' | 'qb' | 'esx' | false
cfg.progressbar = 'ox_lib'

cfg.script = {
    -- QB/QBX -> player_vehicles | ESX -> owned_vehicles, The name of the database table where vehicle data is stored
    -- Vehicles table. Must have a 'plate' column.
    -- A 'custom_plate' LONGTEXT column is created automatically if missing.
    dbTableName = 'player_vehicles',

    -- Only the vehicle owner can apply/remove/flip plates (checked via bridge).
    requireOwnership = false,

    -- Player items that open the paint editor. Leave empty ({}) for presser-only setup.
    -- shouldRemoveItem: consume the item on install.
    -- editorSize: paint canvas resolution (matches the plate aspect ratio).
    items = {
        { item = 'rm_plate_rectangle_s', group = 'rectangle_s', shouldRemoveItem = true, editorSize = { width = 400, height = 100  } },
        { item = 'rm_plate_rectangle_m', group = 'rectangle_m', shouldRemoveItem = true, editorSize = { width = 500, height = 150  } },
        { item = 'rm_plate_rectangle_l', group = 'rectangle_l', shouldRemoveItem = true, editorSize = { width = 600, height = 200  } },
        { item = 'rm_plate_square_s',    group = 'square_s',    shouldRemoveItem = true, editorSize = { width = 400, height = 200  } },
        { item = 'rm_plate_square_m',    group = 'square_m',    shouldRemoveItem = true, editorSize = { width = 500, height = 300  } },
        { item = 'rm_plate_square_l',    group = 'square_l',    shouldRemoveItem = true, editorSize = { width = 600, height = 400  } },
    },

    -- Toggleable plate, switched with G in the driver seat. Set to nil to disable.
    -- allowCustomDesign: false = black plate only, no editor option.
    flipperItem = {
        item              = 'rm_plate_flipper',
        shouldRemoveItem  = false,
        allowCustomDesign = true,
    },

    -- Strips all custom plates and flippers from a vehicle. Set to nil to disable.
    removerItem = {
        item             = 'rm_plate_remover',
        shouldRemoveItem = false,
    },

    -- Progress bar durations (ms).
    progressDuration = {
        install = 3000,
        remove  = 2000,
    },

    -- Animation during progress bars. Set to false to skip the anim.
    progressAnim = {
        dict = 'anim@amb@clubhouse@tutorial@bkr_tut_ig3@',
        name = 'machinic_loop_mechandplayer',
    },

    -- Plates spawn within renderDistance and despawn past removeRenderDistance.
    -- The gap is hysteresis to stop flickering at the boundary.
    renderDistance       = 50.0,
    removeRenderDistance = 65.0,

    -- Mechanic workstations. Each is a world prop with a proximity prompt.
    -- color: SetObjectTextureVariant index.
    --   0 = green    1 = red       2 = dark yellow  3 = green
    --   4 = cyan     5 = blue      6 = navy         7 = dark blue
    --   8 = purple   9 = pink     10 = pink         11 = red
    platePressers = {
        {
            coords      = vec3(-227.1, -1330.19, 29.89),
            rotation    = vector3(0.0, 0.0, 90.0),
            allowedJobs = { 'mechanic' },
            color       = 2,
        },
        {
            coords      = vec3(-1082.41, -3283.27, 12.94),
            rotation    = vector3(0.0, 0.0, 0.0),
            allowedJobs = { 'mechanic' },
            color       = 1,
        },
    },

}

Last updated