removeAllWeapons: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category:[cC]ommand[_ ][gG]roup:[_ ][^|]+\|\{*uc:{{PAGENAME}*]\]" to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...)
Line 1: Line 1:
{{Command|Comments=
{{Command


| ofp |Game name=
| ofp


|1.00|Game version=
|1.00


|eff= global|Multiplayer Effects=
|eff= global


|arg= local|Multiplayer Arguments=
|arg= local


|gr1= Unit Inventory |GROUP1=
|gr1= Unit Inventory


| Removes all weapons and magazines from the given unit. Does not remove map, compass, radio. You can use <tt>unitname [[removeWeapon]] "itemMap";</tt>
| Removes all weapons and magazines from the given unit. Does not remove map, compass, radio. You can use <tt>unitname [[removeWeapon]] "itemMap";</tt>
for example. Doesn't quite work with vehicles. If you need to remove all weapons from a vehicle, remove each weapon individually:
for example. Doesn't quite work with vehicles. If you need to remove all weapons from a vehicle, remove each weapon individually:
<tt>{tank [[removeWeapon]] _x} [[forEach]] [[weapons]] tank;</tt>
<tt>{tank [[removeWeapon]] _x} [[forEach]] [[weapons]] tank;</tt>
|DESCRIPTION=


| '''removeAllWeapons''' unitName|SYNTAX=


|p1= unitName: [[Object]] |PARAMETER1=
| '''removeAllWeapons''' unitName


| [[Nothing]] |RETURNVALUE=
|p1= unitName: [[Object]]
 
| [[Nothing]]
   
   
|x1= <code>[[removeAllWeapons]] [[player]];</code> |EXAMPLE1=
|x1= <code>[[removeAllWeapons]] [[player]];</code>


| [[removeWeapon]], [[setVehicleAmmo]], [[clearWeaponCargo]], [[clearMagazineCargo]], [[removeAllItems]], [[removeBackpack]] |SEEALSO=
| [[removeWeapon]], [[setVehicleAmmo]], [[clearWeaponCargo]], [[clearMagazineCargo]], [[removeAllItems]], [[removeBackpack]]


}}
}}

Revision as of 01:26, 18 January 2021

Hover & click on the images for description

Description

Description:
Removes all weapons and magazines from the given unit. Does not remove map, compass, radio. You can use unitname removeWeapon "itemMap"; for example. Doesn't quite work with vehicles. If you need to remove all weapons from a vehicle, remove each weapon individually: {tank removeWeapon _x} forEach weapons tank;
Groups:
Unit Inventory

Syntax

Syntax:
removeAllWeapons unitName
Parameters:
unitName: Object
Return Value:
Nothing

Examples

Example 1:
removeAllWeapons player;

Additional Information

See also:
removeWeaponsetVehicleAmmoclearWeaponCargoclearMagazineCargoremoveAllItemsremoveBackpack

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