removeWeaponItem: Difference between revisions

From Bohemia Interactive Community
(Created page with "{{RV|type=command |game1= arma3 |version1= 2.22 |arg= local |eff= global |gr1= Unit Inventory |descr= Removes magazine from specified muzzle. It is possible to remove magazine directly from 'Throw' muzzle provided it is configured with <sqf>keepInInventory = 0;</sqf> To add such magazine see addWeaponItem. |s1= unit removeWeaponItem [muzzle, magazine] |p1= unit: Object |p2= muzzle: String - name of the muzzle to add magazine to |p3= magazine: ...")
 
m (Some wiki formatting)
 
Line 10: Line 10:
|gr1= Unit Inventory
|gr1= Unit Inventory


|descr= Removes magazine from specified muzzle. It is possible to remove magazine directly from 'Throw' muzzle provided it is configured with <sqf>keepInInventory = 0;</sqf> To add such magazine see [[addWeaponItem]].
|descr= Removes magazine from the specified muzzle.
It is possible to remove magazine directly from 'Throw' muzzle provided it is configured with <syntaxhighlight lang="cpp" inline>keepInInventory = 0;</syntaxhighlight>.
{{Feature|informative|To add such magazine, see [[addWeaponItem]].}}


|s1= unit [[removeWeaponItem]] [muzzle, magazine]
|s1= unit [[removeWeaponItem]] [muzzle, magazine]


|p1= unit: [[Object]]
|p1= unit: [[Object]]

Latest revision as of 19:37, 6 September 2025

Hover & click on the images for description

Description

Description:
Removes magazine from the specified muzzle. It is possible to remove magazine directly from 'Throw' muzzle provided it is configured with keepInInventory = 0;.
To add such magazine, see addWeaponItem.
Groups:
Unit Inventory

Syntax

Syntax:
unit removeWeaponItem [muzzle, magazine]
Parameters:
unit: Object
muzzle: String - name of the muzzle to add magazine to
magazine: String - class name of the magazine to remove
Return Value:
Nothing

Examples

Example 1:
player removeWeaponItem ["arifle_MX_GL_ACO_F", "1Rnd_HE_Grenade_shell"];

Additional Information

See also:
addWeaponItem addPrimaryWeaponItem addSecondaryWeaponItem addHandgunItem addBinocularItem weaponsItems handgunItems primaryWeaponItems secondaryWeaponItems binocularItems removePrimaryWeaponItem removeSecondaryWeaponItem removeHandgunItem removeBinocularItem

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