Skip to content

SetPlayerItemModel

Gives one of the player’s tagged items the look of another item.

model names another item (its name, id, English name or GUID - the item catalogue); the tagged item then looks like that one everywhere it is drawn: in the player’s hands, on the belt and back, lying on the ground and on every other player’s screen. Only the look changes - the item keeps its own stats, its kind and what it weighs and costs. nil gives the item its own look back. The look belongs to the item: it travels with it through chests, saddlebags and drops, and GetPlayerInventory lists it as model (the other item’s GUID).

Pick a model of the same kind - a sword’s look on a sword, a shield’s on a shield: the hands and the scabbard hold what the item’s own kind holds, so a polearm’s look on a dagger sits wrong. The look is meant for weapons, shields and things carried: worn clothes and armour take it on the other players’ screens, but the wearer’s own game still draws its own piece.

SetPlayerItemModel(pid, id, model)
Parameter Type
pid number the player
id string the tagged item’s id
model string | nil the item whose look it takes; nil = its own

boolean - false when the player holds no item with that id, or no item is called model

-- the champion's blade: a duelling longsword with the look of the Lingua belli
GivePlayerTaggedItem(winner, "longSwordDuel", "prize-" .. year, "Champion's blade", "Won at the tournament of " .. year .. ".")
SetPlayerItemModel(winner, "prize-" .. year, "longSwordLilium")

GivePlayerTaggedItem · SetPlayerItemTag · SetPlayerItemWeight · SetPlayerItemPrice · GetPlayerInventory · the Items and inventory group of the index