{"name":"secondaryWeaponMagazine","operator":null,"title":"secondaryWeaponMagazine","type":"command","url":"https://community.bistudio.com/wiki/secondaryWeaponMagazine","revid":377135,"updated":"2026-01-01T10:28:04Z","groups":["Unit Inventory"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"0.70"}],"since":{"game":"arma3","name":"Arma 3","version":"0.70"},"arma3_since":"0.70","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Collects all loaded magazines from all secondaryWeapon muzzles and returns them in Array, otherwise it returns []. This command is used for infantry weapons only.","syntaxes":[{"syntax":"secondaryWeaponMagazine unit","since":null,"effect":null,"exec":null,"params":[{"name":"unit","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"unit: Object"}],"returns":{"type":"Array of Strings","types":["Array","String"],"description":null,"text":"Array of Strings"},"form":"unary","operator":null,"left":null,"right":{"text":"unit","types":["Object"]}}],"examples":[{"text":"```sqf\nhint str secondaryWeaponMagazine player; //[\"NLAW_F\"]\n```","code":["hint str secondaryWeaponMagazine player; //[\"NLAW_F\"]"]},{"text":"```sqf\n_array = secondaryWeaponMagazine player;\nif (count _array > 0) then {\n    hint (\"Secondary weapon is loaded with \" + (_array select 0) + \"!\");\n} else {\n    if (secondaryWeapon player != \"\") then {\n        hint \"Secondary weapon is not loaded!\";\n    } else {\n        hint \"Player doesn't have a secondary weapon!\";\n    };\n};\n```","code":["_array = secondaryWeaponMagazine player;\nif (count _array > 0) then {\n\thint (\"Secondary weapon is loaded with \" + (_array select 0) + \"!\");\n} else {\n\tif (secondaryWeapon player != \"\") then {\n\t\thint \"Secondary weapon is not loaded!\";\n\t} else {\n\t\thint \"Player doesn't have a secondary weapon!\";\n\t};\n};"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["secondaryWeapon","secondaryWeaponItems","addSecondaryWeaponItem","primaryWeaponMagazine","handgunMagazine","binocularMagazine"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Unit Inventory","Introduced with Arma 3 version 0.70","Scripting Commands"]}