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 }, ornilfor a name the catalogue does not carry
Errors
export.badArgument,error.unavailable
local res = exports.opx_infinity:GetItem('water')
if res.ok and res.value then print(res.value.label, res.value.weight .. ' g') end