FearlessStudios
FiveM ScriptsPaid Scripts

FS-RackControl

Let players rack or retrieve weapons from eligible vehicles. Armor, loadouts, and slings are separate.

version

Get it running

Start Here

Required: FS-Lib, ox_lib, and the built release with its packaged UI and Lua files. The manifest imports @ox_lib/init.lua even when you use default notifications.

Installation

  1. Put the built FS-RackControl folder in your server’s resources directory.

  2. Add the following lines to server.cfg in this order:

    ensure FS-Lib
    ensure ox_lib
    ensure FS-RackControl
  3. Open config.lua for any initial settings you need, then restart the server or resource.

If you choose another notification provider, start it before FS-RackControl as well.

First test: From the driver or front passenger seat of a police vehicle, run /unrack rifle, then /rack rifle. Start with the front seat so you can check weapon and permission settings without testing the outside-vehicle rules at the same time.

Detailed guides and references

Configuration

Optional: Install the provider only if you choose BigDaddy Notify or lation_ui notifications.

Edit the settings you need, then restart the resource.

SettingDefaultMeaning and when to change it
Config.AllowRackFromOutsideVehicletrueAllows rack actions while outside a vehicle. Disable to require players to be inside.
Config.ExecuteMeCommandOnRackActionfalseDoes not send /me automatically. Enable only when you want those roleplay messages and your chat handles them.
Config.Loadout.ClearWeaponsFirsttrueClears existing weapons before applying a loadout. Disable if your intended loadout should preserve other weapons.

Require the configured racking ACE; grant rackcontrol.racking to the intended staff/service group. Change just these lines in your existing file.

Config.Racking.AcePerm.Enabled = true

Usage

Follow the in-game steps.

Troubleshooting

Find the fix by symptom.

The weapon key is unknown

Use a key from Config.Racking.Weapons, such as rifle or shotgun, instead of the GTA weapon model name.

A command is denied or unavailable

Check the feature’s Enabled flag and its own AcePerm settings. Racking, armor, and loadouts have separate permissions.

Startup reports ox_lib/init.lua missing

Install ox_lib and start it before FS-RackControl. The manifest imports it even if you don’t use ox_lib notifications.