All packs
Gunrack FiveM gun rack script in action

FiveM script

Gunrack

Vehicle gun rack for FiveM. Officers store weapons and ammo inside department vehicles.

$12.99

Custom setup

+$5.00

We set Gunrack up for your server: your jobs, vehicles (custom police cars included), weapon and ammo items, language and department name. Write to us after your purchase. Bigger changes to how the script works are quoted separately.

Ask for custom setup
Version
1.1.2
Compatible with
ESX, QBCore, Qbox, ox_inventory, Standalone
License
Your Cfx.re account (asset escrow)
Delivery
Right after payment, to your Cfx.re account
Refunds
Digital product, no refunds after deliveryTebex terms of sale

About

Gunrack is a FiveM gun rack script that puts a weapon rack inside your department vehicles. Officers store and take weapons and ammo from any seat while the vehicle is stopped.

Stored weapons stand between the front seats and ammo packs lie in the trunk, so everyone around can see what the car carries. A weapon goes into the rack with the ammo loaded in it; spare ammo is listed separately.

Built for live servers: every action is checked on the server, it works with the common frameworks and inventories out of the box, and the files you need to adapt stay open.

What is included

  • Opens with G from any seat while the vehicle is stopped, closes with G or ESC
  • 8 slots per vehicle, each holds a weapon or an ammo stack
  • Weapons keep their loaded ammo; with ox_inventory and QBCore also serial number and attachments
  • Visible props: weapons between the front seats, ammo packs in the trunk
  • /trunkview opens only the trunk lid to show the ammo
  • Live for every occupant: the panel updates for everyone in the car
  • Job locked, racks saved per plate across restarts
  • Transparent side panel with weapon pictures

Before and after

Same car, same angle. Drag the line to compare an empty department vehicle with a loaded rack.

Weapons upright between the front seats
Without GunrackWith Gunrack
Weapons upright between the front seats
Ammo packs on the trunk floor
Without GunrackWith Gunrack
Ammo packs on the trunk floor

Try it in your browser

This is the real Gunrack panel. Store and take weapons and ammo with the buttons, close it with ESC and open it again with G. Nothing is saved, it only runs on this page.

What's in the package

Escrow (Cfx asset escrow) only locks the core of the script. The config, language and framework / inventory bridge files you adapt to your server come open; the interface files are not locked either.

  • gunrack(9)
    • fxmanifest.lua
    • config.luaOpen
    • README.md
    • client(1)
      • main.luaLocked
    • server(3)
      • framework.luaOpen
      • inventory.luaOpen
      • main.luaLocked
    • shared(1)
      • init.luaLocked
    • locales(9)
      • tr.luaOpen
      • en.luaOpen
      • de.luaOpen
      • es.luaOpen
      • fr.luaOpen
      • it.luaOpen
      • nl.luaOpen
      • pl.luaOpen
      • pt.luaOpen
    • html(4)
      • index.html
      • app.js
      • style.css
      • img(6)
        • WEAPON_ASSAULTRIFLE.png
        • WEAPON_CARBINERIFLE.png
        • WEAPON_CARBINERIFLE_MK2.png
        • WEAPON_PUMPSHOTGUN.png
        • WEAPON_SMG.png
        • WEAPON_SPECIALCARBINE.png
    • data(1)
      • racks.json

Technical details

Performance

  • Resmon measured in game on our test server: 0.00 ms on foot, 0.01 ms in a loaded rack vehicle, 0.01 ms with the panel open
  • No per-frame loops, one light check every 300 ms
  • Props only for rack vehicles within 60 m (configurable)

Security

  • Every store and take is validated on the server: job, vehicle, seat, distance and the real inventory
  • Rate limited requests, amounts clamped on the server, the client cannot create items
  • Rack state synced with entity state bags written only by the server

Framework and inventory

  • ESX Legacy, QBCore, Qbox and standalone (ACE permission)
  • ox_inventory, qb-inventory and compatible forks, ESX loadout, or the game's own weapons
  • Detected automatically; tested with real players on ESX, ESX + ox_inventory and QBCore
  • No dependencies: no ox_lib, no oxmysql, no database tables

Open files

  • Protected with Cfx asset escrow
  • Open: config.lua, locales, server/framework.lua, server/inventory.lua
  • The framework and inventory bridges are open for custom inventories

Configuration

  • Allowed jobs, vehicle models, slot count
  • Your own weapon list and ammo items per inventory
  • Key, department name on the panel, prop visibility and per-model position fixes

Languages

  • 9 languages included: English, Turkish, German, French, Spanish, Portuguese (Brazil), Polish, Dutch and Italian
  • Config.Locale = 'auto' shows every player the language of their own GTA game
  • Add any language by copying a file in locales/