player:wearVip
player:wearVip(code: string): boolean, string?
Makes the character wear a VIP item.
Refused if the account does not own the item. Only one item is worn per category: the new one replaces the old one.
Parameters#
- code (
string): item code, 64 characters at most
Returns#
boolean, string?: true, or false and the reason for the refusal.
Example#
local ok, reason = player:wearVip("golden_broom")
if not ok then
player:emit("message", reason)
end
Notes#
- Other players' clients also verify the signed proof: an item that is not owned is not displayed.
- If the account loses the item (refund), the server removes it by itself.