addMagazine array

From Bohemia Interactive Community
Jump to: navigation, search
Introduced with Arma 2: Operation Arrowhead version 1.62
  Arguments of this scripting command have to be local to the client the command is executed onEffects of this scripting command are broadcasted over the network and happen on every computer in the network

Click on the images for descriptions

Introduced in

Game:
Arma 2: Operation Arrowhead
Version:
1.62

Description

Description:
Adds a magazine to a person with said ammunition count. Note: When you add a new weapon via scripting commands as well as the magazines for it, the addMagazine command has to be given before the addWeapon command, otherwise the weapon won't be loaded.
Arma 3 logo black.png In Arma 3 this command accepts global arguments Arguments of this scripting command don't have to be local to the client the command is executed on, i.e. you can use it on the server to give remote unit a magazine with limited ammo.

Syntax

Syntax:
unitName addMagazine [magazineName, ammoCount]
Parameters:
unitName: Object - person to add the magazine to
magazineName: String - magazine name. See the topic Category:Weapons for reference about possible values.
ammoCount: Number - number of bullets in the magazine
Return Value:
Nothing

Examples

Example 1:
player addMagazine ["30Rnd_556x45_STANAG", 15];

Additional Information

Multiplayer:
-
See also:
addMagazineaddMagazineGlobaladdMagazinesaddMagazineCargoaddMagazineCargoGlobaladdMagazinePooladdMagazineTurretremoveMagazineremoveMagazinesaddWeapon

Notes

Only post proven facts here. Report bugs on the feedback tracker. Use the talk page or the forums for discussions.
Add New Note | How To

Notes

Bottom Section