GetItemDefinition
One of your items as it was defined.
Syntax
Section titled “Syntax”GetItemDefinition(name)| Parameter | Type | |
|---|---|---|
name |
string | your item’s name |
Returns
Section titled “Returns”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
Example
Section titled “Example”local def = GetItemDefinition("ironore")if def then SendClientMessage(pid, COLOR_SERVER, def.name .. " weighs " .. (def.weight or GetItemClassWeight(def.base)) .. " kg") endSee also
Section titled “See also”DefineItem · GetItemDefinitions · the Items and inventory group of the index
