{"name":"magazinesAmmo","operator":null,"title":"magazinesAmmo","type":"command","url":"https://community.bistudio.com/wiki/magazinesAmmo","revid":369329,"updated":"2024-09-03T18:43:00Z","groups":["Unit Inventory","Vehicle Inventory"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"0.76"}],"since":{"game":"arma3","name":"Arma 3","version":"0.76"},"arma3_since":"0.76","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"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","since":null,"effect":null,"exec":null,"params":[{"name":"vehicle","type":"Object","optional":false,"default":null,"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","types":["Object"],"since":null,"text":"vehicle: Object - 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"}],"returns":{"type":"Array of Arrays in format:","types":["Array"],"description":"String: magazine class name - Number: magazine ammo count","text":"Array of Arrays in format:\n- String: magazine class name\n- Number: magazine ammo count"},"form":"unary","operator":null,"left":null,"right":{"text":"vehicle","types":["Object"]}},{"syntax":"magazinesAmmo [vehicle, includeEmpty]","since":"arma3 2.00","effect":null,"exec":null,"params":[{"name":"vehicle","type":"Object","optional":false,"default":null,"description":"unit or vehicle.","types":["Object"],"since":null,"text":"vehicle: Object - unit or vehicle."},{"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"}],"returns":{"type":"Array of Arrays in format:","types":["Array"],"description":"String: magazine class name - Number: magazine ammo count","text":"Array of Arrays in format:\n- String: magazine class name\n- Number: magazine ammo count"},"form":"unary","operator":null,"left":null,"right":{"text":"[vehicle, includeEmpty]","types":["Array"]}}],"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*/"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["magazinesAmmoFull","magazinesAmmoCargo","magazinesDetail","magazines","magazinesTurret"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Unit Inventory","Command Group: Vehicle Inventory","Introduced with Arma 3 version 0.76","Scripting Commands"]}