Difference between revisions of "LUA:GetEquippedItemBySlot"

(Created page with "This function will return an item pointer from a player. ==== Syntax ==== GetEquippedItem([Spawn] Player, [int8] slot) ==== Usage ==== <pre> function hailed(NPC, Spawn) Has...")
 
 
Line 2: Line 2:
  
 
==== Syntax ====
 
==== Syntax ====
GetEquippedItem([Spawn] Player, [int8] slot)
+
GetEquippedItemBySlot([Spawn] Player, [int8] slot)
  
 
==== Usage ====
 
==== Usage ====
 
<pre>
 
<pre>
 
function hailed(NPC, Spawn)
 
function hailed(NPC, Spawn)
     HasItemEquipped(Spawn, 0)
+
     GetEquippedItemBySlot(Spawn, 0)
 
end
 
end
 
</pre>
 
</pre>

Latest revision as of 18:58, 13 August 2013

This function will return an item pointer from a player.

Syntax

GetEquippedItemBySlot([Spawn] Player, [int8] slot)

Usage

function hailed(NPC, Spawn)
    GetEquippedItemBySlot(Spawn, 0)
end

This will return an item pointer to the primary weapon of "Spawn".


Back to LUA Get Functions Index