mdev-weaponsback
Carry your weapons on your back or front, with binds to holster and draw them. Free.
Carry your weapons on your back or front. Every mdevstore weapon is already set up, each placed from its own measured model, and animated weapons keep their finish when you draw them.
Two binds: press Back (
J) or Front (K) with a weapon in your hand to put it there; press again with empty hands to take it out.Works everywhere: QBCore, QBox, ESX, ox_core, ox_inventory, qs-inventory, and standalone / vMenu servers. Detection is automatic through mdev-libs.
Light on your server: nothing is networked. Each player shares only the names of what they carry, and every client draws the weapons itself.
Tidy by default: weapons you drop or sell leave your back on their own, they hide in vehicles, and what you carry is remembered between sessions.
Install
Requirements
mdev-libs, started before this resource, and any mdevstore weapon. Other weapons, vanilla ones included, can be added in
weapons.lua.Add it to server.cfg
After mdev-libs, your framework and your weapons:
server.cfg ensure mdev-libs ensure mdev-weaponsbackRestart the server
Controls
| Key | Command | What it does |
|---|---|---|
J | /weaponback | Put the weapon in your hand on your back, or take it out again. |
K | /weaponfront | Put the weapon in your hand on your front or hip, or take it out again. |
Players can change the keys in Settings → Key Bindings → FiveM. The defaults are set in config.lua.
Putting a weapon away or taking it out plays a short animation with a progress bar. Set Config.Animation.enabled = false for instant swaps.
Tuning positions in game
Each weapon belongs to a size class (long, medium, short, rifle or pistol), and every weapon in a class follows its placement. Tune a class once:
Carry a weapon of that class (a katana is
long) and run/weaponsback edit back.Arrows and PgUp / PgDn move it, hold SHIFT to rotate, hold ALT for fine steps.
Press ENTER to save or BACKSPACE to cancel.
Your F8 console prints two lines: paste the class line into
Config.Classesinconfig.lua(every weapon of the class), or the weapon line into that weapon's entry inweapons.lua(just that one).Restart the resource.
To limit the editor to staff, set Config.EditorAce = 'mdev.weaponsback.edit' and grant it:
add_ace group.admin mdev.weaponsback.edit allowConfig
| Setting | Default | What it does |
|---|---|---|
Config.Keys | J, K | The default binds. |
Config.RenderDistance | 60.0 | Metres within which other players' carried weapons are drawn. |
Config.HideInVehicle | true | Hide carried weapons while in a vehicle. |
Config.Persist | true | Remember what you carry between sessions. |
Config.Animation | on | The holster and draw animation; enabled = false turns it off. |
Config.EditorAce | false | false lets anyone use the editor; an ace name restricts it. |