GetPlayerSlotWeapon

From NPC for VCMP 0.4 Servers
Revision as of 18:45, 26 November 2022 by Habi (talk | contribs) (Created page with "{{Welcome| desc=This will return the weapon which is at the specified slot of the player| params=<syntaxhighlight lang="lua">( playerId, slotId )</syntaxhighlight> <poem>::pla...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Description:
This will return the weapon which is at the specified slot of the player


Parameters:

( playerId, slotId )

playerId: The ID of the player whose weapon is to be checked
slotId: The Slot ID ( 0 -9 ) on which the weapon available is to be determined


Return Values:
-1, if the player is not connected. Otherwise returns the weapon on the slot. If invalid slt is specified, it returns 0 ( fists ) relfuncs=*GetPlayerSlotAmmo