No categories assigned

LUA:HasItem

Revision as of 14:34, 7 May 2013 by Thefoof (talk | contribs) (Created page with "This function will return a true or false if a target has an item. ==== Syntax ==== HasItem(target, item_id) ==== Usage ==== <pre> Example(Player) if HasItem(Player, 1157) then...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This function will return a true or false if a target has an item.

Syntax

HasItem(target, item_id)

Usage

Example(Player)
if HasItem(Player, 1157) then
    Say(Player, "This thing smells.")
end

When Example() is called the if statement checks if the player has the item with an id of "1157" and if it passes the player says the string "This thing smells.".


Back to LUA General Functions Index