Skip to content

Configuration

Everything is in config.lua, commented.

  • The inventory holds the items. sl_trunk stores nothing: the trunk is your inventory’s own trunk (trunk-<plate> in qb-inventory, trunk<plate> in ox_inventory, the plate in qs-inventory). sl_trunk reads it and shows it.
  • The server lays the trunk out with a 3D packer and sends the result to every nearby client, which creates the props locally.
  • Taking is checked by the server: distance, lock, and the item still being there.
Option Default
Locale 'en' A file in locales/
Framework 'auto' 'qbx', 'qb', 'esx'
Inventory 'auto' 'ox', 'qb', 'qs'
Target 'auto' 'sl_interact', 'ox_target', 'qb-target'
RenderDistance 15.0 Metres at which each client creates the props of a trunk
PropsWhenClosed true Props also with the lid shut. Taking and the view only with the lid open
TakeDistance 2.0 Metres from which an item can be taken
Capacity 'physical' 'physical': a move into the trunk is refused if the item cannot be placed as a prop. 'inventory': slots and weight decide; what does not fit is kept but not shown. ox_inventory and qs-inventory cannot refuse items added by other scripts (qs-inventory not even from its own screen)
Layout 'stable' 'stable': props stay where they are, new ones go into free floor. 'compact': re-pack on every change
WallMargin 0.05 Metres props keep from walls and wheel arches
MaxProps 40 Most props in a trunk (in 'physical', also the most items)
Debug false Extra console logs. It also lets every player use the zone editor: keep it false on a live server
Option Default
key 'Q' Default key; each player can change it in Settings > Key Bindings > FiveM
hint true Show the key next to a trunk you can look into
range 2.5 Metres from the player to the trunk opening
fov, ease 50.0, 400 Camera field of view and transition (ms)
pitch, pitches 60, list Preferred angle and the ones tried; the one that sees most of the floor wins
pitchMin, pitchMax, turnMax, turnSpeed Right mouse button: turning limits and sensitivity
zoomMin, zoomMax, zoomStep Mouse wheel zoom
speed 1.2 W/S/A/D movement (m/s)

In the view: left click takes, hold the right button and move the mouse to turn, the wheel zooms, W/S and A/D move, the view key leaves.

Option Default
enabled true
tools lockpick, advancedlockpick, crowbar Items that can force (any one)
cooldown 2000 ms between two tries of the same player
dispatchEvery 60000 One police alert per vehicle at most in this time
alarmMs 30000 How long the alarm sounds
blockedJobs { 'police' } Jobs that cannot force while on duty
allowedJobs nil A list = only these jobs can force
canForce nil Your own server-side check, see Forcing trunks
npc, player Per vehicle type: enabled, minPolice, breakTool, fail / success chances, phases
Option Default
system 'sl_trunk' 'sl_trunk' (ring), 'ox_lib', 'custom'
oxLib ox_lib difficulty per vehicle type and its keys
custom nil Your own minigame, see Forcing trunks
minMs 1500 With ox_lib/custom, a success faster than this is refused
keys E, Q, R, F Ring keys (label and GTA control)
zoneMin, zoneMax 110, 300 Where the band can land (degrees)
pause, resultMs 320, 260 ms between phases and showing the result
lockMovement true The player cannot walk during the ring
sounds Sound per moment; false = silent
Option Default
system 'auto' 'ps-dispatch', 'cd_dispatch', 'none' ('auto' uses the first running)
jobs { 'police' } Who gets the alert; also the jobs counted for minPolice
code, blip Alert code and map blip