Glitched Scripts
Advanced FlatbedsAdvanced Configuration

shared/config.lua

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

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

Beds, UI, winch, and keybinds: Using flatbeds. Offset editor: Flatbed setup. Keys and jobs: Integrations.

Locale and prompts

Config.Locale = 'en'                -- en | es | pt | de | fr | pl
Config.UseTextUI = true             -- false = GTA help text
Config.TextUIPosition = 'right-center'
Config.AutoDisplayDUI = true        -- false = press the interact key to open the UI
Config.DuiOpenAnim = 'center'       -- 'center' | 'top' | false
Config.AllowBackspaceClose = true
Config.OtherKeybind = 'E'           -- label on hook prompts and manage-flatbed help
Config.EnableKeybinds = true
Config.CabControls = true           -- driver can raise / lower / winch / wheel-lift from the cab

See Localization.

Distances and cab lock

Config.ApproachDistance = 2.0       -- on-foot "near truck"
Config.WarpDistance = 3.5           -- max distance to warp into cargo
Config.LockCabWhileMoving = true    -- lock cab stick / sprint while the bed is rolling
Config.CabLockSpeed = 3.0

Winch

Config.WinchEnabled = true
Config.CableSpeed = 0.12
Config.CableMaxLength = 65          -- meters
Config.CableStopDistance = 1.2      -- bumper to winch bone
Config.HookOnUnload = true
Config.ClampOnWindDone = true
Config.ReseatOnClamp = true

Config.WinchAnims is grab / putBack / attach / detach. Config.RemoteAnim is the key-fob clip used from the UI and keybinds. Set RemoteAnim to false to disable it.

Hook-point sprites (cable in hand):

Config.WinchBoneDistance = 8.0
Config.WinchBoneAttachDistance = 1.8
Config.WinchBoneMarkerSize = 0.02
Config.WinchBoneMarkerColor = { r = 255, g = 255, b = 255, a = 175 }
Config.WinchBoneMarkerActiveColor = { r = 255, g = 140, b = 0, a = 255 }
Config.WinchBoneMaxVehicles = 3
Config.WinchBones = { 'bumper_f', 'bumper_r', 'chassis', ... }

Ramp, alerts, markers

Config.RampSpeed = 0.05
Config.BlockUnloadIfRaised = true
Config.ShowAlerts = true            -- Alert() in client/edit.lua
Config.DrawControlMarkers = false
Config.ShowControlHelp = true
Config.MarkerDrawDistance = 5.0
Config.HelpDrawDistance = 2.0
Config.ControlMarker = {
    shape = 1,
    scale = 1.0,
    color = { red = 100, green = 200, blue = 200, alpha = 150 },
    zOffset = 0.0,
    bob = false,
    faceCam = false,
    spin = false,
}

Static helper

Config.StaticHelper = {
    Enable = true,
    Size = vector3(2.5, 6.0, 1.0),  -- width, length, height
    Distance = 5.0,                 -- green when this close to dropOffset
}

Blocked models

Config.BlockedModels = {
    [`bus`] = true,                 -- cannot winch or load
}

Flatbeds also cannot load other flatbeds (CanAttachVehicle in client/edit.lua).

Vehicle rows

Over 60 models ship pre-configured. Addon trucks still need their streamed vehicle files on the server. If a model is not in the list, add it with /flatbedsetup, or contact me and I will be happy to configure it for you.

Config.Vehicles = {
    [`MODEL_NAME`] = {
        bed = 'rolling',            -- rolling | static | trailer
        interact = vector3(-1.8, -4.5, -0.55),
        cargoOffset = vector3(0.0, 0.4, -0.1),
        cargoRotation = vector3(0.0, 0.0, 0.0), -- optional, static
        dropOffset = vector3(0.0, -8.0, -0.55), -- static load / unload
        rampBone = 'misc_a',
        rampRaised = 0.03,
        rampLowered = 0.26,
        cableBone = 'misc_b',
        unwindLimit = 10.0,
        hookRadius = 5.0,
        hookBack = 12.0,
        wheelDoor = 5,              -- optional
        roofAnim = true,            -- optional, convertible roof instead of ramp bone
        extraIndex = 1,             -- with roofAnim
        attachLift = 0.0,           -- optional Z lift when scanning cargo
        attachScan = 5.0,
        dropLift = 0.1,
    },
}
FieldBed typesMeaning
bedall'rolling', 'static', or 'trailer'
interactallControl / world UI offset
cargoOffsetrolling / staticSnap pose on the bed
cargoRotationstatic (optional)Rotation when placing static cargo
dropOffsetstaticPickup / unload zone
rampBonerolling / trailerMoving bed bone
rampRaised / rampLoweredrollingBulldozer-arm positions
cableBonerolling / trailerWinch origin bone
unwindLimitrolling / trailerExtra unwind length
hookRadiusrolling / trailerHook detection radius
hookBackrolling / trailerHook check distance behind the truck
wheelDooroptionalDoor index for the wheel lift
roofAnimoptionalConvertible roof instead of a ramp bone
extraIndexwith roofAnimVehicle extra toggled with the roof
attachLiftoptionalZ lift when scanning cargo
attachScanoptionalScan radius for attach
dropLiftoptionalZ lift on detach

Generate a row with Flatbed setup.

On this page