No categories assigned

LUA:HasItemEquipped

Revision as of 18:03, 13 August 2013 by Thefoof (talk | contribs) (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 ====...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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".


Back to LUA Spawn Functions Index