{"name":"handgunMagazine","title":"handgunMagazine","type":"command","url":"https://community.bistudio.com/wiki/handgunMagazine","revid":377157,"updated":"2026-01-01T10:38:51Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.70"},"since":"arma3 0.70","arma3_since":"0.70","locality":{"argument":"global"},"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","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>"},"form":"unary","right":{"text":"unit"}}],"examples":[{"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};"]}],"see_also":["handgunWeapon","handgunItems","addHandgunItem","removeHandgunItem","removeAllHandgunItems","primaryWeaponMagazine","secondaryWeaponMagazine","binocularMagazine"]}