That would be by using
getWeaponCargo and
getMagazineCargo on the vehicle, and then
addMagazineCargo and
addWeaponCargo on the ammobox.
Hmm.
It seems that the commands
removeMagazineCargo and
removeWeaponCargo might not yet have been ported to Arma 2...however, since you want to move ALL the weapons/magazines, you can simply use
clearWeaponCargo and
clearMagazineCargo to get the job done!
Haven't use the commands myself, but it should be fairly simple. Make a script that looks something like this:
_truck = _this select 0;
_crate = _this select 1;
_ammo = getMagazineCargo _truck;
_weapons = getWeaponCargo _truck;
// Add magazines
for "_i" from 0 to (count ((_ammo select 0) - 1)) do
{
_magtype = ((_ammo select 0) select _i);
_magcount = ((_ammo select 1) select _i);
_crate addmagazinecargo [_magtype, _magcount];
};
// Add weapons
for "_i" from 0 to (count ((_weapons select 0) - 1)) do
{
_weaptype = ((_weapons select 0) select _i);
_weapcount = ((_weapons select 1) select _i);
_crate addweaponcargo [_weaptype, _weapcount];
};
clearMagazineCargo _truck;
clearWeaponCargo _truck;
Called [truckname, cratename] execvm "scriptname.sqf"
Should work, although untested
Wolfrug out.