Skip to main content

OX / QB Migration Examples

OX / QB Migration Examples

Common compatibility patterns when moving an integration to Nord Inventory.

Applies to: Nord Inventory v2.0.0

Count

local count = exports.nord_inventory:GetItemCount(source, 'water')

Add/remove

if exports.nord_inventory:CanCarryItem(source, 'water', 2) then
    exports.nord_inventory:AddItem(source, 'water', 2)
end
exports.nord_inventory:RemoveItem(source, 'water', 1)

Search a slot

local slot = exports.nord_inventory:GetSlotWithItem(source, 'water')

Canonicalize a legacy name

local item = exports.nord_inventory:ResolveItemName(legacyName)

Migrate behavior at the public export boundary. Avoid emulating another inventory's private events/database tables inside Nord.