Configuration

5 min readUpdated 2 days ago

Overview

  • shared/config.lua: settings, commands, editor, item definitions, bone list, theme colors
  • open/client.lua and open/server.lua: hooks you can edit to add your own rules

Default positions come from shared/config.lua and from the live catalog you build in game with /carryadmin. Each player's own adjustments are saved on top of those, per player.

General

shared/config.lua
1Config.Debug = false
2Config.Locale = 'en'
3Config.Theme = 'default'
4Config.WeaponComponents = true
5Config.FlashlightPersist = true
6Config.UpdateInterval = 1000
  • Debug: Console output for troubleshooting
  • Locale: Language file to load from the locales/ folder
  • Theme: Editor theme. Available: default, cyberpunk, wasteland, noir, fantasy, classic
  • WeaponComponents: Render weapon attachments (scopes, suppressors, grips) on holstered weapons
  • FlashlightPersist: Remember flashlight on/off state per weapon serial across holster and draw
  • UpdateInterval: Milliseconds between prop refresh checks. This loop is a safety net, a ped change is picked up the moment it happens

Theme Colors

shared/config.lua
1Config.ThemeColors = {
2    default = { r = 229, g = 140, b = 59, a = 200 },
3}

One accent color per theme, used for the silhouette outline and the bone markers in the editor. Change them to match your server's branding.

Commands

shared/config.lua
1Config.Commands = {
2    Edit = 'carryedit',
3    Reset = 'carryreset',
4    ConfigEditor = 'carryadmin',
5}
  • Edit: Open the position editor for an item (/carryedit [itemName]). With no item name it opens a picker with everything the player is carrying
  • Reset: Reset an item's position to default (/carryreset [itemName])
  • ConfigEditor: Open the admin catalog manager and editor (/carryadmin, requires admin permissions)

Position Limits

shared/config.lua
1Config.MaxPositionOffset = 0.30
2Config.MinPropDistance = 0.12
3Config.MinDistanceFactor = 0.75
  • MaxPositionOffset: How far a player may move an item away from its default position, per axis, in meters
  • MinPropDistance: Minimum distance from the bone center, in meters. Checked on the server as a hard floor
  • MinDistanceFactor: How much of an item's default clearance from the body a player has to keep. 0.75 means the item may give up a quarter of that margin, no more. The position is judged on the worst moment of the idle animation, so an item that sinks into the body on part of the cycle still counts as buried. Raise it to be stricter, set it to 0 to turn the check off. The admin editor is never limited by it

Editor

shared/config.lua
1Config.Editor = {
2    PositionStep = 0.01,
3    RotationStep = 1.0,
4
5    Silhouette = {
6        Enabled = true,
7        ValidColor = { r = 80, g = 220, b = 120, a = 200 },
8        InvalidColor = { r = 255, g = 60, b = 60, a = 220 },
9    },
10
11    Controls = {
12        PositiveX = 109,
13        NegativeX = 108,
14        PositiveY = 111,
15        NegativeY = 110,
16        PositiveZ = 117,
17        NegativeZ = 118,
18        Modifier = 21,
19        Cancel = 177,
20        Confirm = 191,
21    },
22}
  • PositionStep: Meters moved per key press
  • RotationStep: Degrees rotated per key press
  • Silhouette.Enabled: Glowing outline drawn around the item being edited
  • ValidColor: Outline color while the position can be saved. Set it to nil to follow Config.Theme instead
  • InvalidColor: Outline color while the item is buried inside the body. The save stays blocked until it is pulled back out
  • Controls: FiveM control ids for the keyboard editor. Numpad by default, hold the modifier key to switch between moving and rotating

The editor works two ways: drag and turn the item with the 3D gizmo, or move it with the keys. Both save the same values.

Bone List

shared/config.lua
1Config.BoneList = {
2    { id = 24818, label = 'Upper Back (Spine3)' },
3    { id = 57005, label = 'R. Hand' },
4}

The bones offered in the editor, drawn as clickable markers on the character and listed in the panel. Add any GTA bone hash with your own label. The picker also takes a bone id typed by hand, so this list is a shortcut, not a limit.

Item Definitions

Each item maps an inventory item to a model, a bone, and per-gender offsets.

shared/config.lua
1Config.Items = {
2    {
3        name = 'weapon_carbinerifle',
4        prop = 'w_ar_carbinerifle',
5        bone = 24818,
6        isWeapon = true,
7        defaultPosition = {
8            male = {
9                x = -0.02, y = -0.14, z = 0.13,
10                rx = 0.0, ry = 2.5, rz = 5.0,
11            },
12            female = {
13                x = 0.08, y = -0.14, z = 0.12,
14                rx = 0.0, ry = 0.0, rz = 0.0,
15            },
16        },
17    },
18}
  • name: Inventory item name (case-insensitive match)
  • prop: Model to attach. With isWeapon = true the model is the weapon itself, taken from name, and this field is only a label
  • bone: Bone hash the item hangs on (see Config.BoneList)
  • isWeapon: true = weapon asset loader, with components and tint. false = plain prop
  • defaultPosition: Separate offsets for male and female peds. x/y/z = position, rx/ry/rz = rotation in degrees

Players adjust these positions with /carryedit, and their version is saved for them alone, server side.

Admin Config Editor

Use /carryadmin to add items, pick bones and set positions from inside the game. Saves go to the database and reach every connected player live, with no restart.