Skip to content

GetItemClassWeight

What an item of a kind weighs now - the mode’s rule, else the game’s own.

GetItemClassWeight(item)
Parameter Type
item string | number the item class - its name, id, English name or GUID

number - kilograms per piece: the weight SetItemClassWeight set, else the game’s; nil for an item the catalogue does not list

local kg = GetItemClassWeight("bsmt_ironGood")
SendClientMessage(pid, COLOR_SERVER, string.format("a bar of iron weighs %.1f kg here", kg or 0))

SetItemClassWeight · GetItemInfo · the Items and inventory group of the index