{"name":"setVehicleAmmoDef","operator":null,"title":"setVehicleAmmoDef","type":"command","url":"https://community.bistudio.com/wiki/setVehicleAmmoDef","revid":378138,"updated":"2026-02-25T12:58:23Z","groups":["Unit Inventory","Vehicle Inventory"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma3","name":"Arma 3","version":"0.50"},"arma3_since":"0.50","branch":null,"locality":{"argument":"local","effect":"global","server_exec":false},"exec":null,"description":"Sets how much ammunition (compared to the configuration of magazines defined in the vehicle's class) the vehicle has. Note that the ammo will only be added to local turrets. To check the locality of turret use turretLocal.","syntaxes":[{"syntax":"unit setVehicleAmmoDef value","since":null,"effect":null,"exec":null,"params":[{"name":"unit","type":"Object","optional":false,"default":null,"description":"unit or vehicle.","types":["Object"],"since":null,"text":"unit: Object - unit or vehicle."},{"name":"value","type":"Number","optional":false,"default":null,"description":"from 0 (no ammo) to 1 (fully loaded).","types":["Number"],"since":null,"text":"value: Number - from 0 (no ammo) to 1 (fully loaded)."}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"unit","types":["Object"]},"right":{"text":"value","types":["Number"]}}],"examples":[{"text":"```sqf\nplayer setVehicleAmmoDef 0;\n```","code":["player setVehicleAmmoDef 0;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["setVehicleAmmo","ammo","setAmmo","setAmmoCargo","turretLocal"],"notes":[{"user":"Actium","date":"2014-12-20T22:49:00Z","text":"For vehicles this command operates relative to its stock magazine loadout (i.e. its CfgVehicles magazines[] values).\nThus *setVehicleAmmoDef 1* will fully restore a vehicle to its default ammunition capacity, resetting any changes made by intentionally/implicitly adding/removing magazines.\nUse setVehicleAmmo to operate in relation to a vehicle's current magazine loadout."}],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Unit Inventory","Command Group: Vehicle Inventory","Introduced with Arma 3 version 0.50","Scripting Commands","Scripting Commands: Global Effect"]}