This is a script to place a gun rack in the world, and use it for storing weapons.
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.
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',
},
},
- ox_lib
- qb-target - This was used because ox_target has backwards compatibility for qb-target, so it will work with that aswell.
- ox_inventory
- oxmysql
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!
- 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
Rack Placement
Store and Take Weapons