No problem. This one is actually a bit more complicated than others. It'll fill the crate with EVERY possible weapon you have, which usually isn't what you want. For fun and testing it's OK though.
To use it, copy everything in the code box above and save it as a file called ammo.sqf
making sure it's ammo.sqf and not ammo.sqf.txt (see this video
to fix that.) Save ammo.sqf to your mission folder (MyDocs\Arma2 Other Profiles\Nickname\Missions\missionname.takistan or whatever).
Then in the Singleplayer -> Editor place any type of ammo box (First place your player, then Empty -> Ammo from the Units option) you want, the contents will be deleted and replaced so it doesn't matter which one and in the ammo box object's init field type:
_nil = this execVM "ammo.sqf";
Then preview the mission and check the crate.