Difference between revisions of "LUA:HasItemEquipped"
(Created page with "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 ====...") |
(→Usage) |
||
| Line 9: | Line 9: | ||
Say(NPC, "True") | Say(NPC, "True") | ||
end | end | ||
| + | end | ||
</pre> | </pre> | ||
Latest revision as of 18:03, 13 August 2013
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
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".