GetAmmoOfMyWeapon: Difference between revisions

From NPC for VCMP 0.4 Servers
Jump to navigation Jump to search
(Created page with "{{Welcome| desc=Returns the ammo of the weapon specified| params=<source lang="lua">(weaponid)</source> ::weaponid : The ID of the weapon possessed by npc whose ammo is to be determined.| retvals=If the weapon is possessed by npc, then this returns the available ammo of the weapon provided. Otherwise returns 0. Also returns 0 for fists/brass knuckles.| relfuncs= *SelectWeapon *GetAvailableWeapons| }}")
 
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|
{{Welcome|
desc=Returns the ammo of the weapon specified|
desc=Returns the ammo of the weapon specified|

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 the ammo of the weapon specified


Parameters:

(weaponid)
weaponid : The ID of the weapon possessed by npc whose ammo is to be determined.


Return Values:
If the weapon is possessed by npc, then this returns the available ammo of the weapon provided. Otherwise returns 0. Also returns 0 for fists/brass knuckles.



Related Functions

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