No categories assigned
LUA:HasItem
- Last edited 9 years ago by I need to Update My Profile
LUA - HasItem
Return to: LUA | Tutorials | Portal | Forum | Project Manager | Bug Tracker
LUA Functions: HasItem()
Checks to see if the given player has an item
Syntax
HasItem(param1, param2, [param3])
Parameters
- Required - param1 (Spawn), param2 (int32)
- param1 is the player we want to check
- param2 is the item id to check for
- Optional - param3 (int8)
- param3 is set to 1 to include the players bank
Returns
True if the player has the item
Usage
function Deleted(Quest, QuestGiver, Player)
while HasItem(Player, 5642, 1) do
RemoveItem(Player, 5642)
end
end
This will delete all quests items when the quest is deleted