No categories assigned

LUA:GetItemType

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.