Skip to content

ax.inventory

Inventory management system for creating, storing, and retrieving inventory data.

Documented functions: 4  ·  Realm: server

Functions


ax.inventory:Create(data, callback)

Creates a new inventory in the database and returns the inventory object via callback.

Realm: server

Parameters

Name Type Description
data table Optional data table containing inventory properties.
callback function\|nil Optional callback function called with the created inventory or false on failure.

Source: gamemode/framework/libraries/sh_inventory.lua:91


ax.inventory:CreateTemporary(data, callback)

Creates a temporary in-memory inventory instance (no database persistence).

Realm: server

Parameters

Name Type Description
data table Optional data table containing inventory properties (id, maxWeight).
callback function\|nil Optional callback function called with the created inventory.

Source: gamemode/framework/libraries/sh_inventory.lua:43


ax.inventory:Restore(client, callback)

Restores all inventories associated with the client's characters from the database.

Realm: server

Parameters

Name Type Description
client Player The player whose inventories should be restored.

Usage

ax.inventory:Restore(client)

Source: gamemode/framework/libraries/sh_inventory.lua:205


ax.inventory:Sync(inventory)

Synchronizes the specified inventory with all clients.

Realm: server

Parameters

Name Type Description
inventory table\|number The inventory table or inventory ID to sync.

Usage

ax.inventory:Sync(inventory)

Source: gamemode/framework/libraries/sh_inventory.lua:151