Skip to content

Config Settings

Config Settings#

Everything you need to edit lives in shared/config.lua. Anchor points, bone indexes and surface limits live in shared/defaults.lua and do not need editing.

Change a value, save the file and restart the resource. Placements are stored in the database and are never overwritten by a config change.

General

lua
Language = 'en',
Command = 'weaponsling',
Keybind = 'F7',
ResetCommand = 'weaponslingreset',
OptionDescription
LanguageLocale used for every notification and the editor interface. Accepts en, tr, de, fr and ru, missing keys fall back to English
CommandChat command that opens the editor, admin only
KeybindDefault key for the editor. Players can rebind it from the FiveM settings
ResetCommandWipes every saved placement on the server, requires confirm as an argument

Display

lua
HideEquippedWeapon = true,
PreventBodyClipping = true,
HideInVehicle = true,
MaxVisibleWeapons = 3,
SyncDistance = 125.0,
OptionDescription
HideEquippedWeaponHides the slung copy of the weapon a player is currently holding, so the same gun is never visible twice
PreventBodyClippingMeasures the real bounding box of the model and pushes it out of the ped so it never sinks into the body. Turn it off only if you want raw offsets
HideInVehicleHides every slung item while the player is inside a vehicle
MaxVisibleWeaponsHow many items are rendered on a single player at once
SyncDistanceDistance in metres at which other players' items are created. Lower it on heavily populated servers

Editor

lua
RotateSpeed = 2.6,
OptionDescription
RotateSpeedDegrees rotated per pixel of mouse drag. Raise it for faster spinning, lower it for finer control

Holding SHIFT while dragging always drops to twelve percent of this speed, so precision work does not depend on this value.

Category defaults

lua
UseCategoryDefaults = true,
WeaponCategories = {},
OptionDescription
UseCategoryDefaultsWeapons without their own saved placement fall back to the default saved for their category. Set to false and those weapons stay hidden until you place them one by one
WeaponCategoriesForces a custom or addon weapon into a category, for cases where the name alone is not enough

Valid categories are pistol, smg, rifle, shotgun, sniper, heavy and melee.

lua
WeaponCategories = {
    weapon_customrifle = 'rifle',
    my_katana = 'melee'
},

Admins can also toggle category defaults from the Records tab in the editor, without touching the config.

Inventory

lua
Inventory = 'auto',
InventoryImagePath = 'auto',
InventoryRefreshMs = 8000,
OptionDescription
Inventoryauto picks the first running inventory it finds. Set it manually if you run more than one
InventoryImagePathauto resolves the image folder from the selected inventory. Override it with a full nui:// path when your images live elsewhere
InventoryRefreshMsHow often a player's inventory is polled, in milliseconds. Item pickup events already trigger an instant refresh, so this is only a safety net

Accepted values for Inventory are auto, qb-inventory, new-qb-inventory, ps-inventory, lj-inventory, ox_inventory, quasar_inventory, codem-inventory, core_inventory and inventory.

A custom image path looks like InventoryImagePath = 'nui://ox_inventory/web/images/'. Keep the trailing slash.

Admin permissions

lua
AdminPermissions = { 'god', 'admin' },
AdminAce = 'frkn.weaponsling.admin',
AcceptCommandAceAdmins = true,
OptionDescription
AdminPermissionsFramework groups allowed to open the editor and manage server wide placements
AdminAceAce permission that grants the same access, useful when you do not want to rely on framework groups
AcceptCommandAceAdminsTreats anyone holding the general command ace as an admin

Every admin action is checked server side, so a player cannot open the editor or write a placement by faking an event.

Vehicle weapons

lua
VehicleWeapons = {
    Enabled = true,
    Inventory = 'auto',
    SyncDistance = 35.0,
    MaxSyncedVehicles = 8,
    RefreshMs = 6000,
    SurfaceLift = 0.025,
    VehicleOffsets = {}
},
OptionDescription
EnabledShows weapons stored in trunks and gloveboxes. Set to false to disable the whole system and hide the Vehicles tab
Inventoryauto uses the inventory chosen by FRKN.Inventory. Direct adapters exist for qb, new-qb, ps, lj and ox_inventory
SyncDistanceDistance in metres at which vehicle contents are rendered
MaxSyncedVehiclesHow many nearby vehicles are tracked at once. The closest vehicles always win
RefreshMsHow often a vehicle's storage is re-read. Vehicles within ten metres refresh faster automatically
SurfaceLiftExtra height in metres applied when a weapon is dropped onto a surface, stops models from sinking into the trunk floor
VehicleOffsetsPer model corrections used while creating points

Use VehicleOffsets when one vehicle model needs a different bone or height than the automatic guess:

lua
VehicleOffsets = {
    [`adder`] = {
        trunkHeight = 0.08,
        gloveboxHeight = -0.04,
        trunkBone = 'bonnet',
        gloveboxBone = 'seat_pside_f'
    }
},

Points are saved per vehicle model, not per vehicle. Create them once for a model and every car of that model uses them.

Props

lua
PropModels = {},
OptionDescription
PropModelsMaps a non weapon inventory item to a GTA prop model

Use true when the item name and the prop model name are identical, and a string when they differ:

lua
PropModels = {
    my_item = 'prop_model_name',
    another_item = true
},

You do not have to use this list. Registering a prop from the editor saves it to the database and works the same way. PropModels exists for items you want defined in code, and it is also what makes an item eligible for trunk display.

Model overrides

lua
ModelOverrides = {},
OptionDescription
ModelOverridesForces a specific GTA model for a weapon instead of the one the game generates

Some custom weapons cannot build a weapon object. Point them at a real model:

lua
ModelOverrides = {
    weapon_customar = 'w_ar_customar'
},

Blacklist

lua
BlacklistedWeapons = {
    weapon_unarmed = true,
    weapon_briefcase = true,
    weapon_briefcase_02 = true,
    weapon_garbagebag = true,
    weapon_handcuffs = true
},
OptionDescription
BlacklistedWeaponsItems listed here never appear in the editor and are never attached to a player

Add any item name set to true. The check is case insensitive.

Advanced: shared/defaults.lua

This file holds the ten body anchors, their bone indexes, the default offset for each anchor, the surface limits used by the clipping system and the female offset table. It is tuned against the freemode models and does not need editing. Changing a bone index or a surface axis here will move every existing placement that uses that anchor.