Well, it sounds like more of a hassel to do this then to fill the ammo crate myself with what I want. Anyways there are some flaws in your idea (sorry but its my job to poin them out):
1. If any explosions go off near the crates, the body will be moved.
2. If the ammo crate is destroyed, being able to pick up weapons would still be possible
3. Since the soldier has only 10 (or less in some cases) ammo slots, when you swaped a weapon it would cause problems with storage, etc...
4. BlackOps or Spetznaz (or any soldier with the hide body ability) can hide the body, causing the weapons and ammo to be no more.
5. Its kinda a bad idea, I mean it defeats the whole purpose of an ammo crate, and it really really is simple as hell to create a script to fill the ammo crates.
6. MP, this would never work right in MP, especialy with delete dead body scripts, etc...
7. If one soldier can't fill it up to your standards, and you use multiple soldiers, thats where it really gets buggy, and could result in some actions causing bad lag
8. If anyone is having trouble filling ammo crates, ill make them a script myself just for them, since it really should be a requirement before you start any mission. And there have to be tons of scripts allready made that do this
_magazines = _this select 0
_weapons = _this select 1
_box = _this select 2
clearmagazinescargo _box
clearweaponscargo _box
{_box addmagazinecargo [_X,1]} foreach _magazines
{_box addweaponcargo [_X,1]} foreach _weapons
exit
Simple, see? Just make the parameter something like this:
[["M16","M16","M16","M16","HandGrenade","HandGrenade","BerettaMag"],["M16","Beretta"],this] exec "ammofill.sqs"
Using that in the init of the ammo box would fill it with 4 M16 mags, 2 hand grenades, 1 M9 mag, 2 M16s and 1 M9.
[MagArray,WeapArray,boxname]
MagArray = ["classname","classname","classname"]
WeapArray = ["classname","classname","classname"]
boxname = ammo box name (or this for init box)
Incase you don't all know what arrays are.
Also, if you don't know any classnames, name your BAS pilot AmmoGuy and add this to the ammo box init:
[magazines AmmoGuy,weapons AmmoGuy,this] exec "ammofill.sqs"