GetAvailableWeapons: Difference between revisions

From NPC for VCMP 0.4 Servers
Jump to navigation Jump to search
(Created page with "{{Welcome|desc=Returns all the weapons possessed by npc as an array| params=<source lang="lua">NoParams</source>| retvals=an array whose values are the IDs of the weapons possessed by the npc. The weaponid 0 (fists) is excluded.| relfuncs= *SelectWeapon *GetAmmoOfMyWeapon| example= <source lang="lua"> local a = GetAvailableWeapons(); SendChat("I have "+ a.len()+" weapons.");</source> }}")
 
No edit summary
 
Line 1: Line 1:
<poem style="border: 2px solid #d6d2c5; background-color: #f9f4e6; padding: 1em;">
This function is to be added in v1.6 beta 4 patch 2  and will not work on previous versions.
</poem>
{{Welcome|desc=Returns all the weapons possessed by npc as an array|
{{Welcome|desc=Returns all the weapons possessed by npc as an array|
params=<source lang="lua">NoParams</source>|
params=<source lang="lua">NoParams</source>|

Latest revision as of 18:37, 8 May 2023

This function is to be added in v1.6 beta 4 patch 2 and will not work on previous versions.


Description:
Returns all the weapons possessed by npc as an array


Parameters:

NoParams


Return Values:
an array whose values are the IDs of the weapons possessed by the npc. The weaponid 0 (fists) is excluded.


Example

local a = GetAvailableWeapons();
SendChat("I have "+ a.len()+" weapons.");

Related Functions

The following functions may be helpful as they relate to this function in one way or another.