Taylor1984 14 Posted April 8, 2018 Hi Is there a script you can make to add magazines to a unit's weapon regardless of which weapon it is? I would like to use the script on numerous units to give them more ammo. I've tried setVehicleAmmo 1 but I guess that's for vehicles. Thanks Share this post Link to post Share on other sites
Belbo 462 Posted April 8, 2018 https://community.bistudio.com/wiki/addMagazine in combination with https://community.bistudio.com/wiki/currentMagazine or https://community.bistudio.com/wiki/primaryWeaponMagazine or even https://community.bistudio.com/wiki/getUnitLoadout Share this post Link to post Share on other sites
Grumpy Old Man 3551 Posted April 8, 2018 15 minutes ago, Taylor1984 said: Hi Is there a script you can make to add magazines to a unit's weapon regardless of which weapon it is? I would like to use the script on numerous units to give them more ammo. I've tried setVehicleAmmo 1 but I guess that's for vehicles. Thanks _addWeapon = [player,currentWeapon player,1] call BIS_fnc_addWeapon;//add 1 magazine for the current weapon to the player Cheers 1 Share this post Link to post Share on other sites
Taylor1984 14 Posted April 8, 2018 9 minutes ago, Grumpy Old Man said: _addWeapon = [player,currentWeapon player,1] call BIS_fnc_addWeapon;//add 1 magazine for the current weapon to the player Cheers Worked like a charm. Thanks! 1 Share this post Link to post Share on other sites
Belbo 462 Posted April 8, 2018 #edit: I have to correct all I have written in this post. I did not know that BIS_fnc_addWeapon does not replace the currentWeapon with a weapon of the same classname (and thus reverting all changes to primaryWeaponItems made before that). 1 Share this post Link to post Share on other sites
HazJ 1289 Posted April 8, 2018 You can also do something like: _weapMagTypes = getArray (configFile >> "CfgWeapons" >> "arifle_MX_F" >> "magazines"); player addMagazine (_weapMagTypes select 0); 1 Share this post Link to post Share on other sites