addMagazine array: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Undo revision 83155 by ReleaseTheKraken (talk))
(arma 3 note formatted)
Line 15: Line 15:
'''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.  
'''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.  


'''Note:''' In Arma 3 this command accepts global arguments, i.e. you can use it on the server to give remote unit a magazine with limited ammo. |= Description
{{Feature arma3|In Arma 3 this command accepts global arguments {{EffArg|cmd|arg|glob}}, i.e. you can use it on the server to give remote unit a magazine with limited ammo. }}|= Description
____________________________________________________________________________________________
____________________________________________________________________________________________



Revision as of 16:00, 30 August 2014

Hover & click on the images for description

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
In Arma 3 this command accepts global arguments Template:EffArg, i.e. you can use it on the server to give remote unit a magazine with limited ammo.
Groups:
Uncategorised

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

See also:
addMagazineaddMagazineGlobaladdMagazinesaddMagazineCargoaddMagazineCargoGlobaladdMagazinePooladdMagazineTurretremoveMagazineremoveMagazinesaddWeapon

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

Bottom Section