mdevstore

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

  1. Requirements

    mdev-libs, started before this resource, and any mdevstore weapon. Other weapons, vanilla ones included, can be added in weapons.lua.

  2. Add it to server.cfg

    After mdev-libs, your framework and your weapons:

    server.cfg
    ensure mdev-libs
    ensure mdev-weaponsback
  3. Restart the server

Controls

KeyCommandWhat it does
J/weaponbackPut the weapon in your hand on your back, or take it out again.
K/weaponfrontPut 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:

  1. Carry a weapon of that class (a katana is long) and run /weaponsback edit back.

  2. Arrows and PgUp / PgDn move it, hold SHIFT to rotate, hold ALT for fine steps.

  3. Press ENTER to save or BACKSPACE to cancel.

  4. Your F8 console prints two lines: paste the class line into Config.Classes in config.lua (every weapon of the class), or the weapon line into that weapon's entry in weapons.lua (just that one).

  5. Restart the resource.

To limit the editor to staff, set Config.EditorAce = 'mdev.weaponsback.edit' and grant it:

server.cfg
add_ace group.admin mdev.weaponsback.edit allow

Config

SettingDefaultWhat it does
Config.KeysJ, KThe default binds.
Config.RenderDistance60.0Metres within which other players' carried weapons are drawn.
Config.HideInVehicletrueHide carried weapons while in a vehicle.
Config.PersisttrueRemember what you carry between sessions.
Config.AnimationonThe holster and draw animation; enabled = false turns it off.
Config.EditorAcefalsefalse lets anyone use the editor; an ace name restricts it.
mdev-weaponsback · Extras docs · mdevstore