Well an easier way to do this is
this addmagazine "wateverammo"
right in the init field of the gun, just find out what ammo it uses like on a site or here at OFPEC
a fun little piece of code here
this addweapon "MachineGun30";
this addmagazine "MachineGun30"
In the INIT field of course, always fun to use
;D