No categories assigned

LUA:HasItemEquipped

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


Back to LUA Spawn Functions Index