You are viewing an old version of this page. Return to the latest version.
Version of 18:03, 13 August 2013 by I need to Update My Profile
No categories assigned
LUA:HasItemEquipped
- Last edited 12 years ago by I need to Update My Profile
This function will return a true or false if a player has an item equipped of the used item id.
Syntax
HasItemEquipped([Spawn] Player, [int32] item_id)
Usage
function hailed(NPC, Spawn)
if HasItemEquipped(Spawn, 12345678) then
Say(NPC, "True")
end
When an npc with this function is hailed, the npc will check if the player has the item with the id of 12345678 equipped. If this is true, the npc will say "True".