Nailpolish 10 Posted May 11, 2014 I know of the setvehicleammo command but how would I go about increasing the vehicle ammo by let's say 0.2 when a trigger activates? Share this post Link to post Share on other sites
Harzach 2518 Posted May 12, 2014 The value can't exceed 1, so you'll need to add the appropriate number of magazines instead. Sent from my SPH-L720 using Tapatalk Share this post Link to post Share on other sites
3lockad3 11 Posted May 12, 2014 I know of the setvehicleammo command but how would I go about increasing the vehicle ammo by let's say 0.2 when a trigger activates? this example is for the Humvees ported from arma 2 If you are runing it with a function script it may look like this {_veh addMagazineTurret ["100Rnd_127x99_mag",[0]]} foreach [1,2,3,4]; Or if you run it directly in the vehicle init it would look like this. {this addMagazineTurret ["100Rnd_127x99_mag",[0]]} foreach [1,2,3,4]; Of course the class of the ammo is relevant to the lines I provided. If you need any help what so ever please inbox me. You will also need to be able to run the code/script after respawn! Share this post Link to post Share on other sites
Nailpolish 10 Posted May 16, 2014 Been trying to get this work but so far no luck Share this post Link to post Share on other sites
Lala14 135 Posted May 16, 2014 Been trying to get this work but so far no luck Alright so this is what I think we can do We can get the magazines of said turret pretty easy but if we want a specific amount in the mag this will require a bit more code so say the 32rnd 120mm we could half this to 16 by some maths I'll post a script soonish ---------- Post added at 00:27 ---------- Previous post was at 00:14 ---------- Alright I sort of need a bit more information, so do you want a new magazine coupled with it (the engine does not allow you to put more than the default amount of bullets e.g. 30rnd Stanag can only be 30rnd not more) or just up the ammo currently in the vehicle (please not that we can't go over the default!) Share this post Link to post Share on other sites
Nailpolish 10 Posted May 16, 2014 I may have been getting the class names wrong for the magazines, it's working now. Share this post Link to post Share on other sites