Inventory — Client
Functions
GetItemInfo
Returns item definition data.
local info = Bridge.Inventory.GetItemInfo(item)
-- Returns: table| Parameter | Type | Description |
|---|---|---|
| item | string | Item name |
HasItem
Checks if the player has an item.
local has = Bridge.Inventory.HasItem(item, amount)
-- Returns: boolean| Parameter | Type | Description |
|---|---|---|
| item | string | Item name |
| amount | number | Minimum amount (optional, default 1) |
GetItemCount
Returns the count of an item in the player’s inventory.
local count = Bridge.Inventory.GetItemCount(item)
-- Returns: number| Parameter | Type | Description |
|---|---|---|
| item | string | Item name |
GetPlayerInventory
Returns the player’s inventory.
local inventory = Bridge.Inventory.GetPlayerInventory()
-- Returns: tableItems
Returns all registered items.
local items = Bridge.Inventory.Items()
-- Returns: tableGetImagePath
Returns the image path for an item.
local path = Bridge.Inventory.GetImagePath(item)
-- Returns: stringStripPNG / StripWebp
Utility functions to remove file extensions from item image strings.
local clean = Bridge.Inventory.StripPNG(str)
local clean = Bridge.Inventory.StripWebp(str)