addWeaponItem: Difference between revisions
Jump to navigation
Jump to search
m (Bot: Reverted to revision 92562 by killzone_kid on 2015-10-23T11:50:04Z) |
m (template:command argument fix) |
||
Line 11: | Line 11: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| 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. |= | | 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. |DESCRIPTION= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| unit '''addWeaponItem''' [weaponName, itemName]|= | | unit '''addWeaponItem''' [weaponName, itemName]|SYNTAX= | ||
|p1= unit: [[Object]] |= Parameter 1 | |p1= unit: [[Object]] |= Parameter 1 | ||
Line 21: | Line 21: | ||
|p4 = itemName: [[String]] - class name of the item to add (if magazine, muzzle will be autodetected)|= | |p4 = itemName: [[String]] - class name of the item to add (if magazine, muzzle will be autodetected)|= | ||
| [[Nothing]] |= | | [[Nothing]] |RETURNVALUE= | ||
| s2= unit '''addWeaponItem''' [weaponName, [itemName, ammoCount, muzzleName]]|= | | s2= unit '''addWeaponItem''' [weaponName, [itemName, ammoCount, muzzleName]]|SYNTAX= | ||
|p21= unit: [[Object]] |= Parameter 1 | |p21= unit: [[Object]] |= Parameter 1 | ||
Line 33: | Line 33: | ||
|p27 = muzzleName (Optional): [[String]] - optional target muzzle to add magazine to |= | |p27 = muzzleName (Optional): [[String]] - optional target muzzle to add magazine to |= | ||
|r2= [[Nothing]] |= | |r2= [[Nothing]] |RETURNVALUE= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Line 40: | Line 40: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| [[addPrimaryWeaponItem]], [[addSecondaryWeaponItem]], [[addHandgunItem]], [[weaponsItems]], [[handgunItems]], [[primaryWeaponItems]], [[secondaryWeaponItems]], [[removePrimaryWeaponItem]], [[removeSecondaryWeaponItem]], [[removeHandgunItem]] |= | | [[addPrimaryWeaponItem]], [[addSecondaryWeaponItem]], [[addHandgunItem]], [[weaponsItems]], [[handgunItems]], [[primaryWeaponItems]], [[secondaryWeaponItems]], [[removePrimaryWeaponItem]], [[removeSecondaryWeaponItem]], [[removeHandgunItem]] |SEEALSO= | ||
}} | }} |
Revision as of 11:25, 7 April 2019
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