{"name":"magazinesAmmo","title":"magazinesAmmo","type":"command","url":"https://community.bistudio.com/wiki/magazinesAmmo","revid":379365,"updated":"2026-10-30T23:56:48Z","groups":["Unit Inventory","Vehicle Inventory"],"status":"ok","games":{"arma3":"0.76"},"since":"arma3 0.76","arma3_since":"0.76","description":"Returns all vehicle's magazines and their ammo count (also works on supply boxes). When applied to a unit (soldier), the command behaves differently and will omit magazines already loaded into unit's weapons. Use magazinesAmmoFull to return all magazines.","syntaxes":[{"syntax":"magazinesAmmo vehicle","params":[{"name":"vehicle","type":"Object","description":"unit or vehicle or container. When transport is supplied, the command returns vehicle's magazines not the cargo. When container is supplied, the command behaves identically to magazinesAmmoCargo","type_expr":"Object"}],"returns":{"type":"Array of Arrays","type_expr":"Array<Array>","description":"in format:\n- String: magazine class name - Number: magazine ammo count","text":"Array of Arrays in format:\n\n- String: magazine class name\n- Number: magazine ammo count"},"form":"unary","right":{"text":"vehicle"}},{"syntax":"magazinesAmmo [vehicle, includeEmpty]","since":"arma3 2.00","params":[{"name":"vehicle","type":"Object","description":"unit or vehicle.","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"}],"returns":{"type":"Array of Arrays","type_expr":"Array<Array>","description":"in format:\n- String: magazine class name - Number: magazine ammo count","text":"Array of Arrays in format:\n\n- String: magazine class name\n- Number: magazine ammo count"},"form":"unary","right":{"text":"[vehicle, includeEmpty]"}}],"examples":[{"text":"```sqf\n_magazinesAmmo = magazinesAmmo player;\n/*\n[\n    [\"30Rnd_65x39_caseless_mag\",30],\n    [\"30Rnd_65x39_caseless_mag\",30],\n    [\"16Rnd_9x21_Mag\",16],\n    [\"SmokeShellGreen\",1],\n    [\"Chemlight_green\",1],\n    [\"HandGrenade\",1]\n]\n*/\n```","code":["_magazinesAmmo = magazinesAmmo player;\n/*\n[\n\t[\"30Rnd_65x39_caseless_mag\",30],\n\t[\"30Rnd_65x39_caseless_mag\",30],\n\t[\"16Rnd_9x21_Mag\",16],\n\t[\"SmokeShellGreen\",1],\n\t[\"Chemlight_green\",1],\n\t[\"HandGrenade\",1]\n]\n*/"]},{"text":"```sqf\n_magazinesAmmo = magazinesAmmo Mi_48;\n/*\n[\n    [\"250Rnd_30mm_APDS_shells\",250],\n    [\"250Rnd_30mm_HE_shells\",250],\n    [\"8Rnd_LG_scalpel\",8],\n    [\"38Rnd_80mm_rockets\",38]\n]\n*/\n```","code":["_magazinesAmmo = magazinesAmmo Mi_48;\n/*\n[\n\t[\"250Rnd_30mm_APDS_shells\",250],\n\t[\"250Rnd_30mm_HE_shells\",250],\n\t[\"8Rnd_LG_scalpel\",8],\n\t[\"38Rnd_80mm_rockets\",38]\n]\n*/"]}],"see_also":["magazinesAmmoFull","magazinesAmmoCargo","magazinesDetail","magazines","magazinesTurret"],"notes":[{"user":"Actium","date":"2014-12-20T14:41:00Z","text":"When used on vehicles this will only return all magazines associated with a single turretPath (which one depends on the actual armament of the vehicle, usually the first armed turretPath or alternatively turretPath [-1]).\nIf you want to get all turrets' magazines, use allTurrets and magazinesTurret.\n--Actium (talk) 15:41, 20 December 2014 (CET)"}]}