Inventory — Client

Functions

GetItemInfo

Returns item definition data.

local info = Bridge.Inventory.GetItemInfo(item)
-- Returns: table
ParameterTypeDescription
itemstringItem name

HasItem

Checks if the player has an item.

local has = Bridge.Inventory.HasItem(item, amount)
-- Returns: boolean
ParameterTypeDescription
itemstringItem name
amountnumberMinimum amount (optional, default 1)

GetItemCount

Returns the count of an item in the player’s inventory.

local count = Bridge.Inventory.GetItemCount(item)
-- Returns: number
ParameterTypeDescription
itemstringItem name

GetPlayerInventory

Returns the player’s inventory.

local inventory = Bridge.Inventory.GetPlayerInventory()
-- Returns: table

Items

Returns all registered items.

local items = Bridge.Inventory.Items()
-- Returns: table

GetImagePath

Returns the image path for an item.

local path = Bridge.Inventory.GetImagePath(item)
-- Returns: string

StripPNG / StripWebp

Utility functions to remove file extensions from item image strings.

local clean = Bridge.Inventory.StripPNG(str)
local clean = Bridge.Inventory.StripWebp(str)