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

From COD Modding & Mapping Wiki
Share/Save/Bookmark
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