ax.inventory¶
Source: gamemode/framework/libraries/sh_inventory.lua
Inventory management system for creating, storing, and retrieving inventory data.
Documented functions: 3
Functions¶
ax.inventory:Create(data, callback)ax.inventory:Restore(client, callback)ax.inventory:Sync(inventory)
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. |
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: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