{"name":"setAmmoOnPylon","operator":null,"title":"setAmmoOnPylon","type":"command","url":"https://community.bistudio.com/wiki/setAmmoOnPylon","revid":310926,"updated":"2022-05-07T20:47:37Z","groups":["Vehicle Loadouts"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.70"}],"since":{"game":"arma3","name":"Arma 3","version":"1.70"},"arma3_since":"1.70","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Set count of ammo in magazine on pylon (supports pylon name since Arma 3 v1.94)","syntaxes":[{"syntax":"vehicle setAmmoOnPylon [pylon, ammocount]","since":null,"effect":null,"exec":null,"params":[{"name":"vehicle","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"vehicle: Object"},{"name":"pylon","type":"Number or String","optional":false,"default":null,"description":"pylon index (index starts from 1) or pylon name (see getCompatiblePylonMagazines Example 4)","types":["Number","String"],"since":null,"text":"pylon: Number or String - pylon index (index starts from 1) or pylon name (see getCompatiblePylonMagazines Example 4)"},{"name":"ammocount","type":"Number","optional":false,"default":null,"description":"ammo count","types":["Number"],"since":null,"text":"ammocount: Number - ammo count"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"vehicle","types":["Object"]},"right":{"text":"[pylon, ammocount]","types":["Array"]}}],"examples":[{"text":"```sqf\nvehicle player setAmmoOnPylon [1, 12];\n```","code":["vehicle player setAmmoOnPylon [1, 12];"]},{"text":"```sqf\nvehicle player setAmmoOnPylon [\"pylon1\", 12];\n```","code":["vehicle player setAmmoOnPylon [\"pylon1\", 12];"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["Arma 3: Vehicle Loadouts","getCompatiblePylonMagazines","getPylonMagazines","animatePylon","animateBay","setPylonsPriority","setPylonLoadout","setMagazineTurretAmmo"],"notes":[{"user":"Commy2","date":"2017-08-18T14:20:00Z","text":"The pylon indices start at 1 and not at 0."}],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Vehicle Loadouts","Introduced with Arma 3 version 1.70","Scripting Commands"]}