Frameworks
QBCore

QBCore

⚠️

QBCore support is experimental and cannot work as a "drag and drop" solution due to many incompatibilities.

Compatibility

Ox Inventory provides a complete suite of tools to replace the built-in items and inventory system from QBCore, and is not intended to be used with resources designed around it.

  • Stashes used by qb-inventory and its forks do not work, but can possibly be converted.
  • Remove qb-inventory (or similar), or qb-core will not function properly.
  • Remove qb-shops and qb-weapons, as they depend on qb-inventory and conflict.
  • Weapon holstering and draw animations (like in qb-smallresources) may break our own methods.

Qbox Project

Qbox is a fork of QBCore being developed by a team of former contributors and developers on QBCore. The team is focused on improving performance and security, as well as converting resources to support our resources (mainly ox_lib and ox_inventory).

We strongly advise using Qbox as an alternative to QBCore.

Installation

Convert QBCore

If you have existing player data, you will need to convert it to a compatible format.

  • Start the server and type convertinventory qb into the server console.
  • Restart the server once conversion is complete.

Optional Optimisation

All item related functions from Player, such as Player.Functions.GetItemByName, have been modified for compatibility purposes; however they are considered deprecated.

The reasoning is fairly simple - there's now additional function references and overhead to consider. Fortunately, the new Inventory functions can be used directly and offer a great deal of improvements over the old ones.

You should read through the functions section for further information, but the following should give you a decent idea.

local acetone = Player.Functions.GetItemByName('acetone')
local antifreeze = Player.Functions.GetItemByName('antifreeze')
local sudo = Player.Functions.GetItemByName('sudo')
if acetone?.amount > 2 and antifreeze?.amount > 4 and sudo?.amount > 9 then
    Player.Functions.RemoveItem("acetone", 3)
    Player.Functions.RemoveItem("antifreeze", 5)
    Player.Functions.RemoveItem("sudo", 10)
end