GetItemClassWeight
What an item of a kind weighs now - the mode’s rule, else the game’s own.
Syntax
Section titled “Syntax”GetItemClassWeight(item)| Parameter | Type | |
|---|---|---|
item |
string | number | the item class - its name, id, English name or GUID |
Returns
Section titled “Returns”number - kilograms per piece: the weight SetItemClassWeight set, else the game’s; nil for an item the catalogue does not list
Example
Section titled “Example”local kg = GetItemClassWeight("bsmt_ironGood")SendClientMessage(pid, COLOR_SERVER, string.format("a bar of iron weighs %.1f kg here", kg or 0))See also
Section titled “See also”SetItemClassWeight · GetItemInfo · the Items and inventory group of the index
