Difference between revisions of "LUA:GetItemType"
(Created page with "= LUA Functions: GetItemType() = This returns the itemtype from an item pointer. ==== Syntax ==== GetItemType(param1) ==== Parameters ==== ; Required - ''param1'' (Item*) : '...") |
(No difference)
|
Latest revision as of 18:37, 24 November 2013
LUA Functions: GetItemType()
This returns the itemtype from an item pointer.
Syntax
GetItemType(param1)
Parameters
- Required - param1 (Item*)
- param1 is the item to check itemtype
Usage
function hailed(NPC, Spawn)
local item = GetEquippedItemBySlot(Spawn, 0)
Say(NPC, GetItemType(item))
end
When this spawn is hailed, the spawn will say the itemtype value of the item equipped in the player's 0 slot (primary weapon) in chat.