addWeaponItem: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Created page with "{{Command|= Comments ____________________________________________________________________________________________ | arma3 |= Game name |1.38|= Game version |arg= local |= A...")
 
(see also)
Line 40: Line 40:
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[addPrimaryWeaponItem]], [[addSecondaryWeaponItem]], [[addHandgunItem]], [[weaponsItems]], [[handgunItems]], [[primaryWeaponItems]], [[secondaryWeaponItems]] |= See also
| [[addPrimaryWeaponItem]], [[addSecondaryWeaponItem]], [[addHandgunItem]], [[weaponsItems]], [[handgunItems]], [[primaryWeaponItems]], [[secondaryWeaponItems]], [[removePrimaryWeaponItem]], [[removeSecondaryWeaponItem]], [[removeHandgunItem]] |= See also


}}
}}

Revision as of 13:50, 23 October 2015

Hover & click on the images for description

Description

Description:
Adds a weapon item to the specified weapon. The item can be weapon magazine, in which case the amount of ammo and target muzzle could also be specified.
Groups:
Uncategorised

Syntax

Syntax:
unit addWeaponItem [weaponName, itemName]
Parameters:
unit: Object
[weaponName, itemName]: Array
weaponName: String - name of the weapon to add magazine to
itemName: String - class name of the item to add (if magazine, muzzle will be autodetected)
Return Value:
Nothing

Alternative Syntax

Syntax:
unit addWeaponItem [weaponName, [itemName, ammoCount, muzzleName]]
Parameters:
unit: Object
[weaponName, [magazineName, ammoCount, muzzleName]]: Array
weaponName: String - name of the weapon to add magazine to
[itemName, ammoCount, muzzleName]: Array
itemName: String - class name of the item to add (if magazine, muzzle will be autodetected unless specified)
ammoCount (Optional): Number - optional amount of ammo in magazine
muzzleName (Optional): String - optional target muzzle to add magazine to
Return Value:
Nothing

Examples

Example 1:
player addWeaponItem ["arifle_MX_GL_ACO_F", "1Rnd_HE_Grenade_shell"];
Example 2:
player addWeaponItem ["arifle_MX_GL_ACO_F", ["1Rnd_HE_Grenade_shell", 1, "GL_3GL_F"]];

Additional Information

See also:
addPrimaryWeaponItemaddSecondaryWeaponItemaddHandgunItemweaponsItemshandgunItemsprimaryWeaponItemssecondaryWeaponItemsremovePrimaryWeaponItemremoveSecondaryWeaponItemremoveHandgunItem

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