Skip to content

Installation

Installation#

Requirements

ResourceRequiredNotes
ox_libYesShared dependency, must start first
oxmysqlYesStores every placement, must start first
FrameworkYesqb-core, qbx_core or es_extended, detected automatically
InventoryYesDetected automatically, see the list below

Supported inventories are qb-inventory, new-qb-inventory, ps-inventory, lj-inventory, ox_inventory, qs-inventory, qs_inventory, codem-inventory, core_inventory and inventory.

Step 1 - Add the resource

Drag the frkn-weaponsling folder into your resources directory, for example:

text
resources/frkn-weaponsling

Step 2 - Start the resource

Add this to your server.cfg, after ox_lib, oxmysql, your framework and your inventory:

cfg
ensure frkn-weaponsling

If your resources are grouped with ensure [qb] or a similar folder start, make sure frkn-weaponsling is inside that group or started after it.

Step 3 - Set up the database

The resource creates its own tables on first start, so there is nothing to import. Three tables are created:

TableWhat it holds
frkn_weaponsling_presetsServer wide placement for each weapon or item
frkn_weaponsling_playersPersonal placement saved per character
frkn_weaponsling_vehicle_presetsTrunk and glovebox points per vehicle model

A frkn-weaponsling.sql file ships with the resource if your database user cannot create tables. Import it once and start the resource normally.

Missing columns are added automatically when you update the resource, so never drop the tables to fix an update. Dropping them deletes every saved placement.

Step 4 - Give yourself admin access

The editor is admin only. Any of the following grants access:

MethodHow
Ace permissionadd_ace group.admin frkn.weaponsling.admin allow in your server.cfg
Framework groupBe in a group listed in AdminPermissions, god and admin by default
Command aceAny player with the general command ace, while AcceptCommandAceAdmins is true

Open shared/config.lua to change which groups count as admin:

lua
AdminPermissions = { 'god', 'admin' },
AdminAce = 'frkn.weaponsling.admin',
AcceptCommandAceAdmins = true,

Leave AcceptCommandAceAdmins on true only if you trust everyone holding the command ace. Set it to false on a public server and rely on the dedicated ace instead.

Step 5 - Set your language

Open shared/config.lua:

lua
Language = 'en',

Available locale codes are en, tr, de, fr and ru. Every key lives in the matching file inside locales, and any key you leave out falls back to English.

Installation is done. Press F7 in game to open the editor and read the Features page to learn what it can do.

Commands

CommandWho can use itWhat it does
/weaponslingAdminOpens and closes the editor, also bound to F7
/weaponslingreset confirmAdminDeletes every saved placement on the server

Both commands are validated on the server, so a player without permission gets a notification and nothing else happens. Change the command names and the key in shared/config.lua:

lua
Command = 'weaponsling',
Keybind = 'F7',
ResetCommand = 'weaponslingreset',

Keybind only sets the default. Each player can rebind it from the FiveM keybind settings.

Troubleshooting

ProblemFix
Nothing happens on F7You are not admin, check Step 4
The editor opens but the item list is emptyYour inventory is not detected, set Inventory manually in shared/config.lua
Item images are missing in the listSet InventoryImagePath manually, for example nui://ox_inventory/web/images/
Placements are not savedoxmysql started after the resource, fix the ensure order
A custom weapon shows nothingAdd it to ModelOverrides with a valid GTA model
An item shows nothingIt has no prop model yet, register one from the editor
Weapons do not show in trunksVehicleWeapons.Enabled is false, or no point exists for that vehicle model