Call of Duty 4: Scripting Reference - Player::AnyAmmoForWeaponModes

From COD Modding & Mapping Wiki
Share/Save/Bookmark
Jump to: navigation, search


AnyAmmoForWeaponModes( <weapon name> )

Module: Player

Summary:

Returns true if the player has any ammo available for the weapon or any of it's alt-modes (grenade launcher, etc).


Call this on: The player

Example:

if ( level.player AnyAmmoForWeaponModes( "m4_grenadier" ) ) [...]

Required arguments:

  1. <weapon name>: (string) The weapon name for this weapon.


Optional arguments:

none


Notes:

none