Skip to content

GetItemDefinition

One of your items as it was defined.

GetItemDefinition(name)
Parameter Type
name string your item’s name

table - {base =, name =, text =, weight =, price =, health =, quality =, model =, stack =} (base and model as class GUIDs; weight, price and model absent when they are the base’s), nil for a name that is none of yours

local def = GetItemDefinition("ironore")
if def then SendClientMessage(pid, COLOR_SERVER, def.name .. " weighs " .. (def.weight or GetItemClassWeight(def.base)) .. " kg") end

DefineItem · GetItemDefinitions · the Items and inventory group of the index