OPX//77
CreatorsServer exports

GetItem

Last updated on

Reads one catalogue entry.

local res = exports.opx_infinity:GetItem(name)

Scope read · sync.

Parameters

  • name: string — 1–64 characters

  • Answers the entry as the inventory screen reads it, including items registered at runtime.

Returns

  • table? — { label, description?, weight, image?, usable, stackable, droppable, category, weapon, ammo }, or nil for a name the catalogue does not carry

Errors

  • export.badArgument, error.unavailable
Example
local res = exports.opx_infinity:GetItem('water')
if res.ok and res.value then print(res.value.label, res.value.weight .. ' g') end

On this page

No Headings