Studios
Mechanic Menuhouse-3.jpg

Configuration

SoonMechanic MenuQbox
PAGE 03 OF 07  ·  INSTALLATION → CONFIGURATION → EXAMPLESdocs.glitchstudios.dev
Browse docs

Everything is in config.lua, which stays open in the escrow, and each setting has a comment. All text is in locales/en.json. The parts that workshop mode can hand out are defined in shared/parts.lua, also open.

General#

Setting Default What it does
Config.Debug false Prints integration failures to the F8 and server consoles.
Config.Command 'glitchmechanic' Name of the admin command. The ACE checked for saving and presets is command.<name>.
Config.Restricted 'group.admin' The ACE group allowed to use the command.
Config.DriverOnly true Only the driver can open the admin menu. false allows any seat.
Config.MaxDistance 15.0 How far (metres) the player may be from the car. The server refuses to start a session or save from further away, and the menu closes when the player walks off.
Config.PhotoCdn 'https://cdn.glitchstudios.dev' Base URL for rim photos, read as <cdn>/vehiclewheels/<type>/<index>.webp. The default is the Glitch Studios photo CDN. Point it at your own host, or '' for numbered tiles.
Config.Money { locale = 'en-AU', symbol = '$' } Number format for prices (a BCP 47 locale such as 'en-GB' or 'de-DE') and the symbol put in front.

Workshop payments and sessions#

Setting Default What it does
Config.RequirePaidConfirm true A paid workshop job keeps its parts only after your pay callback calls ConfirmSessionPaid(source). false trusts the client's word that it paid; keep it for old setups only.
Config.LegacyPayCallbacks { 'qbx_police:server:workshopPay' } Pay callbacks that do not call ConfirmSessionPaid yet. For these the server accepts "paid" once it has seen the player call the callback with every billed part. The default entry belongs to another server and does nothing without it; set {}.
Config.RequireSessionGrant false When true, order and workshop menus open only after the opening resource's server called AllowSession.
Setting Default What it does
Config.NoExtrasModels { 'nksultanrs' } Spawn names of cars whose extras are hidden on the Body tab, for example a civilian car that shares its model with a police version whose extras are the lightbar. The default is an add-on car from another server; replace it or use {}.
Config.AddonLabels { car_stereo = 'Smart Radio' } Labels shown instead of the item label for Extras rows from the addons integration.

Integrations and logging#

Setting Default What it does
Config.NetEventGuard 'auto' Bundled net event guard (server/guard.lua). 'auto' loads it only when glitch-poolcleaning is installed, true always, false never. It counts and reports; it never blocks.
Config.Integrations See below The resource name for each optional integration, or false to turn it off.
Config.Log { resource = 'glitch-admin', webhook = 'business' } Where saves and presets are logged. A table calls exports[resource]:Log({ webhook, source, event, title, message, data }) while that resource runs. A function is called as fn(source, event, title, message, data). false turns logging off.
Config.Integrations = {
    presets = 'glitch-admin',             -- presets and the car photo
    photos = 'glitch-photos',             -- part photos
    addons = 'glitch-mechanicJob',        -- Extras rows, engine and turbo sound pickers
    lights = 'glitch-emergencyVehicles',  -- emergency light groups
    keybar = 'glitch-uiElements',         -- mouse and key hints on the shared key bar
    airhorn = 'al_lightbars',             -- airhorn on emergency cars
    vehicleNames = 'qbx_core',            -- model hash -> spawn name for photo lookups
}

Workshop parts#

shared/parts.lua lists the parts that OpenLimited can hand out. Each one names its menu tab, the rows it unlocks and the ox_lib property keys it may change and is billed for.

Part Tab Property keys
paint Paint color1, color2, paintType1, paintType2
paintExtra Paint pearlescentColor, wheelColor, interiorColor, dashboardColor
extras Body extras (also hands out emergency light groups)
livery Body livery, modRoofLivery, modLivery
tint Lights windowTint

Translations#

To add a language, create a file such as locales/de.json and set the ox:locale convar. Keys missing from your file fall back to English. The top-level keys hold notifications, mod slot names and key bar labels. The nui table holds the menu page labels, keyed by their English text:

"nui": {
    "Undo all": "Alles zuruecksetzen"
}

Words in braces such as {n} or {amount} are filled in by the menu and must stay in the translation. GTA paint names are not listed, but you can add any of them to the nui table the same way.