theend3r 83 Posted August 1, 2016 I know there is the setVehicleAmmo command but is there an equivalent to get the ratio of current/full ammo or at least boolean if the ammo is full? If not, I'm sure many of you have already written something like this so could you please share your solutions? I know I could probably save all the turrets in an array, somehow retrieve their max ammo from configs and compare it to the current ammo but if someone's already done it, I would prefer not to. Share this post Link to post Share on other sites
lexx 1412 Posted August 1, 2016 Why not use ammo? It doesn't tell you in %, but at least you can count the current amount and then compare with what it should be. Share this post Link to post Share on other sites
theend3r 83 Posted August 1, 2016 Why not use ammo? It doesn't tell you in %, but at least you can count the current amount and then compare with what it should be. I know, I just don't know how to get the "what it should be" from config. Share this post Link to post Share on other sites
HallyG 240 Posted August 1, 2016 I know, I just don't know how to get the "what it should be" from config. To return a magazine's maximum capacity: getNumber (configFile >> "CfgMagazines" >> MAGAZINE >> "count"); 1 Share this post Link to post Share on other sites
theend3r 83 Posted August 1, 2016 OK, solved it. For future reference: if (({getNumber (configFile >> "CfgMagazines" >> _x select 0 >> "count") != _x select 1} count (magazinesAmmo _this)) > 0) exitWith {false}; true Thanks 2 Share this post Link to post Share on other sites