{"name":"magazinesDetailVest","operator":null,"title":"magazinesDetailVest","type":"command","url":"https://community.bistudio.com/wiki/magazinesDetailVest","revid":377203,"updated":"2026-01-01T11:37:09Z","groups":["Unit Inventory"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.04"}],"since":{"game":"arma3","name":"Arma 3","version":"1.04"},"arma3_since":"1.04","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Returns an array with the type names of all the unit's vest magazines.","syntaxes":[{"syntax":"magazinesDetailVest 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"]}},{"syntax":"magazinesDetailVest [unit, includeEmpty, includeLoaded]","since":"arma3 2.00","effect":null,"exec":null,"params":[{"name":"unit","type":"Object","optional":false,"default":null,"description":"unit","types":["Object"],"since":null,"text":"unit: Object - unit"},{"name":"includeEmpty","type":"Boolean","optional":true,"default":"false","description":"true to include empty magazines","types":["Boolean"],"since":null,"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)","types":["Boolean"],"since":null,"text":"includeLoaded: Boolean - (Optional, default false) true to include magazines loaded in weapons (Since Arma 3 v2.07.148195)"}],"returns":{"type":"Array of Strings","types":["Array","String"],"description":null,"text":"Array of Strings"},"form":"unary","operator":null,"left":null,"right":{"text":"[unit, includeEmpty, includeLoaded]","types":["Array"]}}],"examples":[{"text":"```sqf\nmagazinesDetailVest player;\n/*\n[\n    [\"6.5 mm 30Rnd Sand Mag(30/30)[id/cr:10000012/0]\",\n    \"RGO Grenade(1/1)[id/cr:10000016/0]\",\n    \"RGO Grenade(1/1)[id/cr:10000017/0]\"]\n]\n*/\n```","code":["magazinesDetailVest player;\n/*\n[\n\t[\"6.5 mm 30Rnd Sand Mag(30/30)[id/cr:10000012/0]\",\n\t\"RGO Grenade(1/1)[id/cr:10000016/0]\",\n\t\"RGO Grenade(1/1)[id/cr:10000017/0]\"]\n]\n*/"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["magazinesDetail","magazinesDetailUniform","magazinesDetailBackpack"],"notes":[{"user":"Leopard20","date":"2021-09-12T22:07:44Z","text":"To return the ammo count in each magazine, you can use this code:\n\n```sqf\nmagazinesDetailVest 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```"}],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Unit Inventory","Introduced with Arma 3 version 1.04","Scripting Commands"]}