Call of Duty 4: Scripting Reference - Weapons::ItemWeaponSetAmmo

From COD Modding & Mapping Wiki
Share/Save/Bookmark
Revision as of 00:17, 1 August 2009 by CoDEmanX (talk | contribs) (New page: {{Function |Version=4 |Name=ItemWeaponSetAmmo( <clip ammo>, <reserve ammo>, <alt weapon>, ) |Module=Weapons |Available |Summary=Sets the ammo ammount for a weapon item e...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


ItemWeaponSetAmmo( <clip ammo>, <reserve ammo>, <alt weapon>, )

Module: Weapons

Summary:

Sets the ammo ammount for a weapon item entity (lying on the ground)


Call this on: A weapon item entity

Example:

weapon ItemWeaponSetAmmo( 5, 20 );

Required arguments:

  1. <clip ammo> The amount of ammo in the clip.
  2. <reserve ammo> The amount of ammo not in the clip.


Optional arguments:

  1. <alt weapon> Pass zero to set ammo for the primary weapon. Pass 1 to set ammo for the alt weapon. The default is 0.


Notes:

none