v5.0.3 minor
Container items, server-checked crafting, saving on logout and security fixes
11changes

Container items, server-checked crafting, saving on logout and security fixes
11changes

[02] Release
Items like a cigarette box can now open their own small inventory, some items can be blocked from being dropped, and crafting can be cancelled. Crafting is now checked by the server, server events a modified client could call are closed, the inventory saves on logout with stock QBCore, and switching characters no longer copies items between them.
config/storage.lua for the containers. If you keep your own config/ folder, add this file.Container items. Set them up in /inventoryconfig → Item rules → Containers, or in config/storage.lua. The item must be usable in your item list, and it's best to make it unique. Each box keeps its own contents, and its default items are only put in the first time it's opened. Only the player carrying it can open it. Containers inside other containers are off by default.
Items that can't be dropped. /inventoryconfig → Item rules → Limits and protected items. Items in this list can't be dropped on the ground, thrown or placed.
Cancel crafting. /inventoryconfig → Crafting → Allow cancelling crafting. Off by default.
ox_inventory compatibility. exports.ox_inventory:GetInventoryItems(source) and exports.ox_inventory:Inventory(source) now return a player's items for scripts made for ox_inventory. For stashes, use the native exports.
Replace every file in the resource, except what you edited yourself:
fxmanifest.lua — new version.config/config.lua — framework detection order. config/storage.lua — new file.server/custom/framework/esx.lua and qb.lua, client/custom/framework/qb.lua — player loaded events and weapons by hash. If you edited them, copy your changes onto the new files.client/custom/misc/CraftItems.lua, server/custom/misc/OpenInventory.lua and SetInventoryData.lua changed.server/modules/containers.lua and client/modules/containers.lua — new files.locales/ — every language changed. Re-apply any translation you edited.web/ — replace the whole folder.The server now decides the recipe, the cost and the success chance. A modified client can no longer craft for free or force a success.
One let a player load another character's inventory onto itself, and another could replace the item list for the whole server. Now only the server can trigger them.
Items like a cigarette box open their own small inventory next to yours. Each box keeps its own contents and starts with its default items the first time it's opened. Set them up in /inventoryconfig or config/storage.lua.
A new list in /inventoryconfig for items that can't be dropped on the ground, thrown or placed.
A new option in /inventoryconfig. Nothing is taken until the crafting finishes. Off by default.
The ox_inventory exports GetInventoryItems and Inventory now return a player's items for scripts made for ox_inventory.
With stock QBCore, the inventory is now saved when a player leaves or changes character.
Switching characters on the same connection no longer copies the previous character's items into the new one, and an old copy can no longer overwrite the inventory of a player who is online.
Scripts that look up a weapon by its hash instead of its name now find it.
With several cores running (for example Qbox with the qb-core bridge), it now always picks Qbox first, then QBCore, then ESX.
The settings panel no longer lags when you search or switch sections.