to add a weapon to a ammo box, put this into it's init field:
this addweaponcargo ["M16",5]; this addmagazinecargo ["M16",5]
this will add 5 M16's and 5 M16 mags.
To add a weapon to a soldier, use this:
removeallweapons this; this addmagazine "M16"; this addmagazine "M16"; this addmagazine "M16"; this addmagazine "M16"; this addweapon "M16
this will remove all of the soldiers previous weapon, and then add 4 M16 mags and a M16 gun.
The comref is the official command reference. This is a list of all the scripting commands that can be used in the game. I siggest looking in the editors depot for tutorial on scripting and mission editing.