Glitched Scripts
Advanced TrailersAdvanced Configuration

shared/config.lua

Owner options in shared/config.lua, what each value does.

Edit options in shared/config.lua. Key and inventory bridges live in client/edit.lua and server/edit.lua.

Hitching, UI, ramps, boats, static, and b-train: Using trailers. Offset editor: Trailer setup. Targeting, inventory, and keys: Integrations.

Locale

Config.Locale = 'en' -- en | es | pt | de | fr | pl

See Localization.

Targeting and prompts

-- auto detects ox_target → qb-target → qtarget → sleepless_interact → interact → inside-interaction
-- or force a name. false = TextUI / GTA help text
Config.Target = 'auto'
Config.TargetName = false
Config.TargetDistance = 5.0
Config.UseTextUI = true
Config.TextUIPosition = "right-center"
Config.OtherKeybind = "E"

UI

Config.CustomUI = true              -- false = ox_lib menus
Config.CustomUIPosition = 'right'   -- top-left, top, top-right, left, center, right, bottom-left, bottom-center, bottom-right

Inventory

Config.Inventory = {
    Enable = true,
    System = 'auto',                -- or force ox_inventory, qb-inventory, ...
    ResourceName = false,
    Default = {
        slots = 10,
        weight = 24000,
    },
}

Per-trailer override or false goes on that trailer's Config.Trailers entry. Details: Integrations.

Hitch any trailer

Config.AllowConnectAny = true
Config.ConnectMessage = false
Config.ConnectDistance = 4.0        -- secondary trailers use 0.6
Config.ConnectKeybind = "J"

Keep AllowConnectAny on so addon trucks can hitch as long as the hitch bones exist.

Helpers

Config.AttachHelpers = {
    Enable = true,
    Size = vec3(0.4, 0.4, 0.6),
}

Config.StaticHelper = {
    Enable = true,
    Size = vec3(2.5, 6.0, 1.0),
}

Hitch helpers turn from red to green when you can connect. Static helpers draw at static.load.

B-train

Config.BTrain = {
    Enable = true,
    Limit = 6,
    AllowInvisible = true,          -- hide the player during the link attempt
    Attempts = 3,
}

More trailers in a chain makes reversing harder. Keep helpers on.

Attach vehicles

Config.AttachMessage = true
Config.AttachKeybind = "E"
Config.AttachDistance = 5.0         -- boats and static load points

Whitelist and blacklist

Config.ForcedWhitelist = false      -- true = only Config.Trailers models work

Config.TrailerBlacklist = {
    [`flatbed`] = true,             -- skip tow / rollback beds
}

The bundled blacklist already includes common rollback and tow hashes so a flatbed script can own those models.

Trailer rows

Over 40 models ship pre-configured. Addon trailers still need their streamed vehicle files on the server. Share extra configs on Discord if you want.

Config.Trailers = {
    [`MODEL_NAME`] = {
        isBoat = false,
        isDolly = false,            -- dolly facing assist. only for dollies
        onAttachedExtras = {},
        offset = vec3(0.0, -1.0, 0.25), -- optional boat attach offset
        ramp = {                    -- false if none
            {
                label = 'Ramp & Doors',
                instant = false,
                doors = {5, 4},
                wait = 1500,
                extras = {},
                extrasHealth = false,
            },
        },
        static = {                  -- false if none
            load = {offset = vec3(0.0, 0.0, 0.0), rotation = vec3(0.0, 0.0, 0.0)},
            bed = {
                {offset = vec3(0.0, 0.0, 0.0), rotation = vec3(0.0, 0.0, 0.0)},
            },
        },
        inventory = { slots = 80, weight = 250000 }, -- or false. omit = Default
    },
}
FieldMeaning
isBoatAttach boats from nearby. Uses offset when set
isDollyKeep the dolly facing the hitch until it links
onAttachedExtrasExtras turned on after a vehicle attaches
offsetBoat attach offset (optional)
rampOne or more door / extra groups for the UI
ramp.labelMenu label (not a locale key)
ramp.instantClose doors immediately
ramp.doorsDoor indexes
ramp.waitDelay after open / close (lifts)
ramp.extrasExtra indexes toggled with the ramp
ramp.extrasHealthRepair so an extra will appear
static.loadWalk-up attach point and helper marker
static.bedLock-in slots. Capacity is the number of entries
inventoryStash override, or false to hide

Generate static with Trailer setup.

On this page