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
Language = 'en',
Command = 'weaponsling',
Keybind = 'F7',
ResetCommand = 'weaponslingreset',
| Option | Description |
|---|---|
Language | Locale used for every notification and the editor interface. Accepts en, tr, de, fr and ru, missing keys fall back to English |
Command | Chat command that opens the editor, admin only |
Keybind | Default key for the editor. Players can rebind it from the FiveM settings |
ResetCommand | Wipes every saved placement on the server, requires confirm as an argument |
Display
HideEquippedWeapon = true,
PreventBodyClipping = true,
HideInVehicle = true,
MaxVisibleWeapons = 3,
SyncDistance = 125.0,
| Option | Description |
|---|---|
HideEquippedWeapon | Hides the slung copy of the weapon a player is currently holding, so the same gun is never visible twice |
PreventBodyClipping | Measures 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 |
HideInVehicle | Hides every slung item while the player is inside a vehicle |
MaxVisibleWeapons | How many items are rendered on a single player at once |
SyncDistance | Distance in metres at which other players' items are created. Lower it on heavily populated servers |
Editor
RotateSpeed = 2.6,
| Option | Description |
|---|---|
RotateSpeed | Degrees 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
UseCategoryDefaults = true,
WeaponCategories = {},
| Option | Description |
|---|---|
UseCategoryDefaults | Weapons 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 |
WeaponCategories | Forces 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.
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
Inventory = 'auto',
InventoryImagePath = 'auto',
InventoryRefreshMs = 8000,
| Option | Description |
|---|---|
Inventory | auto picks the first running inventory it finds. Set it manually if you run more than one |
InventoryImagePath | auto resolves the image folder from the selected inventory. Override it with a full nui:// path when your images live elsewhere |
InventoryRefreshMs | How 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
AdminPermissions = { 'god', 'admin' },
AdminAce = 'frkn.weaponsling.admin',
AcceptCommandAceAdmins = true,
| Option | Description |
|---|---|
AdminPermissions | Framework groups allowed to open the editor and manage server wide placements |
AdminAce | Ace permission that grants the same access, useful when you do not want to rely on framework groups |
AcceptCommandAceAdmins | Treats 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
VehicleWeapons = {
Enabled = true,
Inventory = 'auto',
SyncDistance = 35.0,
MaxSyncedVehicles = 8,
RefreshMs = 6000,
SurfaceLift = 0.025,
VehicleOffsets = {}
},
| Option | Description |
|---|---|
Enabled | Shows weapons stored in trunks and gloveboxes. Set to false to disable the whole system and hide the Vehicles tab |
Inventory | auto uses the inventory chosen by FRKN.Inventory. Direct adapters exist for qb, new-qb, ps, lj and ox_inventory |
SyncDistance | Distance in metres at which vehicle contents are rendered |
MaxSyncedVehicles | How many nearby vehicles are tracked at once. The closest vehicles always win |
RefreshMs | How often a vehicle's storage is re-read. Vehicles within ten metres refresh faster automatically |
SurfaceLift | Extra height in metres applied when a weapon is dropped onto a surface, stops models from sinking into the trunk floor |
VehicleOffsets | Per model corrections used while creating points |
Use VehicleOffsets when one vehicle model needs a different bone or height than the automatic guess:
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
PropModels = {},
| Option | Description |
|---|---|
PropModels | Maps 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:
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
ModelOverrides = {},
| Option | Description |
|---|---|
ModelOverrides | Forces 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:
ModelOverrides = {
weapon_customar = 'w_ar_customar'
},
Blacklist
BlacklistedWeapons = {
weapon_unarmed = true,
weapon_briefcase = true,
weapon_briefcase_02 = true,
weapon_garbagebag = true,
weapon_handcuffs = true
},
| Option | Description |
|---|---|
BlacklistedWeapons | Items 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.