{"name":"handgunMagazine","operator":null,"title":"handgunMagazine","type":"command","url":"https://community.bistudio.com/wiki/handgunMagazine","revid":377157,"updated":"2026-01-01T10:38:51Z","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":"global","effect":null,"server_exec":false},"exec":null,"description":"Collects all loaded magazines from all handgunWeapon muzzles and returns them in Array, otherwise it returns []. This command is used for infantry weapons only.","syntaxes":[{"syntax":"handgunMagazine 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 handgunMagazine player; // [\"16Rnd_9x21_Mag\"]\n```","code":["hint str handgunMagazine player; // [\"16Rnd_9x21_Mag\"]"]},{"text":"```sqf\n_array = handgunMagazine player;\nif (count _array > 0) then {\n    hint (\"Handgun is loaded with \" + (_array select 0) + \"!\");\n} else {\n    if (handgunWeapon player != \"\") then {\n        hint \"Handgun is not loaded!\";\n    } else {\n        hint \"Player doesn't have a handgun!\";\n    };\n};\n```","code":["_array = handgunMagazine player;\nif (count _array > 0) then {\n\thint (\"Handgun is loaded with \" + (_array select 0) + \"!\");\n} else {\n\tif (handgunWeapon player != \"\") then {\n\t\thint \"Handgun is not loaded!\";\n\t} else {\n\t\thint \"Player doesn't have a handgun!\";\n\t};\n};"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["handgunWeapon","handgunItems","addHandgunItem","removeHandgunItem","removeAllHandgunItems","primaryWeaponMagazine","secondaryWeaponMagazine","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"]}