The object that makes dropping weapons possible is called: "weaponholder" (or "secondaryweaponholder" for secondary weapons. eg. LAW's, AT4's etc.)
You'll need to make one of those, and then add your weapons (and magazines) to it. So the code would look something like this:
wh = "weaponholder" createvehicle position
wh addmagazinecargo ["m16",1]; wh addweaponcargo ["m16",1]
So you would end up with a loaded M16 lying on the ground at position (position can be x,y,z co-ords, or (getpos object))