Skip to content

GetItemInfo

The catalogue’s entry for an item key.

GetItemInfo(key)
Parameter Type
key string | number an item’s id, name, English name or GUID

table - {id=, name=, class=, category=, display=, weight=, price=}: the id, the game’s name, the class GUID, the category (MeleeWeapon, Armor, Food …), the English name ("" when the export had none), the weight and the price; nil when unknown

local info = GetItemInfo(stack.class)
if info and info.category == "MeleeWeapon" then
SendClientMessage(pid, COLOUR_SERVER, "a " .. (info.display ~= "" and info.display or info.name))
end

GetItemClass · FindItems · the Catalogues group of the index