{"name":"magazinesDetailUniform","title":"magazinesDetailUniform","type":"command","url":"https://community.bistudio.com/wiki/magazinesDetailUniform","revid":377202,"updated":"2026-01-01T11:36:50Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"1.04"},"since":"arma3 1.04","arma3_since":"1.04","description":"Returns an array with the type names of all the unit's uniform magazines.","syntaxes":[{"syntax":"magazinesDetailUniform unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>"},"form":"unary","right":{"text":"unit"}},{"syntax":"magazinesDetailUniform [unit, includeEmpty, includeLoaded]","since":"arma3 2.00","params":[{"name":"unit","type":"Object","description":"unit","type_expr":"Object"},{"name":"includeEmpty","type":"Boolean","optional":true,"default":"false","description":"true to include empty magazines","type_expr":"Boolean","text":"includeEmpty: Boolean - (Optional, default false) true to include empty magazines"},{"name":"includeLoaded","type":"Boolean","optional":true,"default":"false","description":"true to include magazines loaded in weapons (Since Arma 3 v2.07.148195)","type_expr":"Boolean","text":"includeLoaded: Boolean - (Optional, default false) true to include magazines loaded in weapons (Since Arma 3 v2.07.148195)"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>"},"form":"unary","right":{"text":"[unit, includeEmpty, includeLoaded]"}}],"examples":[{"text":"```sqf\nmagazinesDetailUniform player;\n/*\n[\n    \"6.5 mm 30Rnd Sand Mag(30/30)[id/cr:10000003/0]\",\n    \"Chemlight (Green)(1/1)[id/cr:10000020/0]\"\n]\n*/\n```","code":["magazinesDetailUniform player;\n/*\n[\n\t\"6.5 mm 30Rnd Sand Mag(30/30)[id/cr:10000003/0]\",\n\t\"Chemlight (Green)(1/1)[id/cr:10000020/0]\"\n]\n*/"]}],"see_also":["magazinesDetail","magazinesDetailVest","magazinesDetailBackpack"],"notes":[{"user":"Leopard20","date":"2021-09-12T22:07:51Z","text":"To return the ammo count in each magazine, you can use this code:\n\n```sqf\nmagazinesDetailUniform player apply {\n    private _reverse = reverse _x;\n    private_i1 = (_reverse find \"[)\") + 1;\n    private_i2 = (_reverse find [\"/\", _id1]) + 1;\n    private_i3 = _reverse find [\"(\", _id2];\n    parseNumber reverse (_reverse select [_i2, _i3 - _i2]); // return cnt\n};\n```"}]}