I have not seen very many free backpack scripts so i made one
Works with qbcore and qbox
The main image for this post can be downloaded and used for the script
Supported inventories
qb-inventory
ox_inventory
ps-inventory
qs-inventory
docs are on my github
GitHub
GitHub - Copeman-1/cm-backpacks: backpacks
What's New in Version 2.0.0
Released
New
ox_inventory client.export support
Backpack items now use the client.export pattern instead of registerHook, matching how ox_inventory expects usable items to be wired. Add client = { export = 'cm-backpacks.UseBackpack' } to each backpack entry in your ox_inventory items.lua.
Split item weight and stash capacity
Config now uses itemWeight (how heavy the bag is in the player's inventory) and maxWeight (stash capacity) separately. Previously both used weight, causing the item to weigh the same as its capacity.
Fixed
Backpack stash not opening on ox_inventory
Replaced non-existent forceOpenInventory server export with the correct client-side openInventory('stash', id) call via client event.
Items vanishing on close and reopen
Slot metadata is now fetched fresh from ox_inventory via GetSlot on each use rather than relying on the stale item table, preventing a new stash ID being generated every open.
Notes
qb-inventory, qs-inventory, and ps-inventory are unaffected — all changes are isolated to the ox_inventory bridge. Update your config.lua to rename weight to itemWeight and maxWeight.
For ox_inventory you need to add the item like so: ['backpack1'] = { label = 'Small Backpack', weight = 10, stack = false, consume = 0, client = { export = 'cm-backpacks.UseBackpack' } },
Recommended Comments
Create an account or sign in to comment