{"name":"removeMagazines","operator":null,"title":"removeMagazines","type":"command","url":"https://community.bistudio.com/wiki/removeMagazines","revid":373502,"updated":"2025-05-18T11:00:18Z","groups":["Unit Inventory"],"status":"ok","replaced_by":[],"games":[{"game":"ofp","name":"Operation Flashpoint","version":"1.00"},{"game":"ofpe","name":"Operation Flashpoint: Elite","version":"1.00"},{"game":"arma1","name":"Armed Assault","version":"1.00"},{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"ofp","name":"Operation Flashpoint","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":"local","effect":"global","server_exec":false},"exec":null,"description":"Removes all magazines of given type from the unit. If magazine class does not exist, nothing happens, not even .rpt message, unlike with addMagazine command.","syntaxes":[{"syntax":"unitName removeMagazines magazineName","since":null,"effect":null,"exec":null,"params":[{"name":"unitName","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"unitName: Object"},{"name":"magazineName","type":"String","optional":false,"default":null,"description":null,"types":["String"],"since":null,"text":"magazineName: String"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"unitName","types":["Object"]},"right":{"text":"magazineName","types":["String"]}}],"examples":[{"text":"```sqf\nplayer removeMagazines \"30Rnd_556x45_Stanag\";\n```","code":["player removeMagazines \"30Rnd_556x45_Stanag\";"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["removeAllMagazines","addMagazine","magazines","removeMagazine","removeWeapon","removeMagazinesTurret","removeMagazineTurret","setVehicleAmmo"],"notes":[{"user":"Pyro05x","date":"2007-01-27T03:46:00Z","text":"Though BIS did not provide a command to remove **all** magazines of every type, it can still be accomplished using forEach magazines.\nexample:\n\n```sqf\n{ player removeMagazine _x } forEach magazines player;\n```\n\n**edit:** `removeAllMagazines player;` now exists since Arma 3 v2.20."}],"categories":["ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Unit Inventory","Introduced with Operation Flashpoint version 1.00","Operation Flashpoint: Elite: Scripting Commands","Operation Flashpoint: New Scripting Commands","Operation Flashpoint: Scripting Commands","Scripting Commands","Scripting Commands: Global Effect","Take On Helicopters: Scripting Commands"]}