No categories assigned

LUA:UnequipSlot


LUA:AllFunctions - UnequipSlot

Return to: LUA:AllFunctions | Tutorials | Portal | Forum | Project Manager | Bug Tracker


Unequip a slot

Syntax

UnequipSlot(param1, param2, param3)

Parameters

Required - param1 (Spawn), param2 (int8), param3 (bool)
param1 is the spawn we want to unequip a slot from
param2 is the slot to unequip.
param3 to delete the item or not. no_delete_item = true. Not set will delete the item after unequipped.


Example

function hailed(NPC, Player)
	UnequipSlot(Player, 1, no_delete_item)
end

An NPC with this script will unequip the players slot 1 and will not delete the item.

Notes

Default is delete item.

 UnequipSlot(Player, 1)

no_delete_item = true

 UnequipSlot(Player, 1, no_delete_item)