This should work...
You'll notice the M16 can fire mortars as well as bullets (i.e. 2 ammo types).
So define 2 'magazines' in the main body of the weapon cfgweapon section, i.e.
magazine[]={"HEmag","APmag"};
then make sure you define these 'mag' types as seperate classes which include the proper ammo type that you've already defined in the cfgammo section of the cpp file, i.e.
class HEmag: YourRifle
ammo="HEbullet";
and ...
class AP mag: YourRifle
ammo="APbullet";
If you then give the soldier say 4 mags of each type in his inventory you should get the option to reload whichever one you want to fire, AP or HE.