Skip to Content

Exports & Events

Taken from the shipped source for version 1.0.0.

🖥️ Server exports

ExportArgumentsDescription
OpenInventory(src)Open the inventory for a player.
CloseInventory(src)Close it.
RefreshInventory(src)Push the current inventory to the player.
AddItem(identifier, item, amount, slot, info, reason)Add an item.
RemoveItem(identifier, item, amount, slot, reason)Remove an item.
CanAddItem(src, item, amount)Whether the item fits.
HasItem(src, items, amount)Whether the player has the items.
GetItemBySlot(src, slot)Item in a slot.
GetItemByName(src, item)First item with that name.
GetItemsByName(src, item)All items with that name.
GetItemCount(src, items)Total count.
GetTotalWeight(items)Weight of an item list.
GetFreeWeight(src)Remaining carry weight.
GetInventory(identifier)The inventory table.
SetInventory(src, items)Replace the inventory.
ClearInventory(src, filterItems)Clear the inventory, optionally keeping filterItems.
UseItem(itemName, ...)Use an item.
GetFramework()Detected framework.
GetItemDefinition(item)Item definition table.
local result = exports['nomad-inventory']:OpenInventory(...)

🎮 Client exports

ExportArgumentsDescription
OpenInventory()Open the inventory from the client.

📡 Events

EventSideDescription
nomad-inventory:server:openInventoryserverOpen the inventory.
nomad-inventory:server:refreshInventoryserverRefresh.
nomad-inventory:server:useItemserverUse an item.
nomad-inventory:server:moveItemserverMove an item between slots.
nomad-inventory:server:setQuickSlotserverAssign a hotbar slot.
nomad-inventory:server:showHotbarserverShow the hotbar.
nomad-inventory:server:useHotbarSlotserverUse a hotbar slot.
inventory:server:OpenInventoryserverQB compatibility alias.
qb-inventory:server:OpenInventoryserverQB compatibility alias.
qb-inventory:server:closeInventoryserverQB compatibility alias.
qb-inventory:server:SetInventoryDataserverQB compatibility alias.
nomad-inventory:client:openInventoryclientOpen the UI.
nomad-inventory:client:closeInventoryclientClose the UI.
nomad-inventory:client:inventoryDataclientReceive inventory data.
nomad-inventory:client:hotbarDataclientReceive hotbar data.
nomad-inventory:client:notifyclientNotification.
nomad-inventory:client:usedItemclientAn item was used.
inventory:client:openInventory / qb-inventory:client:openInventoryclientQB compatibility aliases.
Last updated on