FearlessStudios

Configure

Install and configure FS-RackControl

Requirements

  • FS-Lib

Optional:

  • ox_lib (when using NotificationSystem = "ox_lib")
  • BigDaddy Notify (when using NotificationSystem = "bigdaddy")
  • lation_ui (when using NotificationSystem = "lation_ui")

Installation

Copy the FS-RackControl resource folder into your server's resources directory.

Start FS-Lib before FS-RackControl in server.cfg:

ensure FS-Lib
ensure FS-RackControl

Open config.lua and configure loadouts, racking behavior, notifications, and permissions.

Restart your server, or restart the FS-RackControl resource from the server console.

If you use an optional notification integration, start that resource before FS-RackControl too.

Core settings

Prop

Type

Notifications

Config.NotificationSettings:

Prop

Type

When notifications are disabled, commands still run but success/error messages are not shown. If an invalid notification system is configured, FS-RackControl prints an error to the client console.

Racking

Config.Racking:

Prop

Type

Weapon fields:

Prop

Type

Example:

config.lua
Config.Racking.Weapons = {
  rifle = {
    Name = "Carbine Rifle",
    HashString = "WEAPON_CARBINERIFLE",
    AmmoCount = 120,
  },
  shotgun = {
    Name = "Pump Shotgun",
    HashString = "WEAPON_PUMPSHOTGUN",
    AmmoCount = 16,
  },
}

Vehicle behavior

  • Inside a police vehicle, /rack and /unrack work from the driver or front passenger seat.
  • Outside a vehicle, the command only works when Config.AllowRackFromOutsideVehicle = true and a police vehicle is within 5.0 units.
  • Police vehicles are detected by GTA vehicle class 18.
  • If a player selects a configured rack weapon before unracking it, the weapon is removed and the player is told to unrack it first.

Armor

Config.Armor:

Prop

Type

Loadout

Config.Loadout:

Prop

Type

Loadout weapon fields:

Prop

Type

Example:

config.lua
Config.Loadout.Weapons = {
  {
    Name = "Pistol",
    HashString = "WEAPON_COMBATPISTOL",
    Ammo = 120,
    GiveInHand = false,
    Components = {
      "COMPONENT_AT_PI_FLSH",
    },
  },
  {
    Name = "Flashlight",
    HashString = "WEAPON_FLASHLIGHT",
  },
}

Sling

Config.Sling:

Prop

Type

Sling supports two visual slots:

  • /sling f toggles the front slot.
  • /sling b toggles the back slot.

When Config.Sling.AutoUnslingDetection = true, the weapon remains in the player's inventory and selecting it from the weapon wheel silently removes the sling prop. When it is false, FS-RackControl removes the weapon while it is slung, saves ammo, tint, and detected components, then restores the weapon when unslung.

Permissions

ACE checks are disabled by default. Enable each feature's AcePerm.Enabled field to require its configured permission.

Example server.cfg:

add_ace group.leo rackcontrol.racking allow
add_ace group.leo rackcontrol.armor allow
add_ace group.leo rackcontrol.loadout allow

Permission checks:

  • Config.Racking.AcePerm.PermRequired gates /rack and /unrack.
  • Config.Armor.AcePerm.PermRequired gates Config.Armor.Command.
  • Config.Loadout.AcePerm.PermRequired gates Config.Loadout.Command.

Localization

Config.Language selects a JSON file from locales/. For example, Config.Language = "en" loads locales/en.json.

If the selected locale is missing a key, FS-RackControl falls back to the matching English string.

Commands

  • /rack <key> racks a configured weapon.
  • /unrack <key> unracks a configured weapon.
  • /armor gives armor when Config.Armor.Enabled = true and the command name is unchanged.
  • /loadout gives the configured loadout when Config.Loadout.Enabled = true and the command name is unchanged.
  • /sling f toggles the front sling slot.
  • /sling b toggles the back sling slot.

If you rename Config.Armor.Command, Config.Loadout.Command, or Config.Sling.Command, use the configured command names instead.