You'll need the following code, either in the units init or in a script.
unitname addMagazine "MagType"
unitname addWeapon "WeaponName"
unitname addMagazine "MagType"
unitname addMagazine "MagType"
Make sure to always start with one mag otherwise the weapon isn't loaded and the ai dude can't shoot.
Also make sure to get yourself a command reference an absolut must have for any scripting!