/gun_rack

Primary LanguageLuaCreative Commons Zero v1.0 UniversalCC0-1.0

image

✨ Description

This is a script to place a gun rack in the world, and use it for storing weapons.

👀 Usage

Use the included sql script to create the required table and add the snippet below to create the item. Use the gunrack item in your inventory to start the placement process. Once you've placed the rack, you can then target the rack to store weapons in it, or take weapons from it. Optionally, you can set a passcode on the gunrack to limit access to it.

📚 Items

You will need to add a gunrack item to your inventory items list.

['gunrack'] = {
  label = 'Gun Rack',
  weight = 10000,
  stack = false,
  consume = 0,
  client = {
      export = 'js5m_gunrack.placeGunRack',
  },
},

🔗 Dependencies

👐 Credit

A huge thank you to FjamZoo for his research and work with weapons components and skins. Thanks to Snipe for writing the MySQL module code for this. Also, huge shoutout to the Overextended group for their continued work on the ox resources. A big thank you to the guy that was selling roughly this same thing for €120 on the Releases forum, for the motivation to work on this. Keep FiveM free!

✅ TODO

  • PRs are always welcome to add more weapons to the config. I'm sure I'm missing some.
  • Make stun gun its own space
  • Add ammo/armor storage spaces
  • Optimize offsets and rotations
  • Add prop_cs_gunrack functionality

Preview

Rack Placement

https://streamable.com/c98cv3

Store and Take Weapons

https://streamable.com/86msx5

Discord

Joe Szymkowicz FiveM Development