Hi Undeceived,
this might work:
_magsarray = magazines player;
_weaponsarray = weapons player;
_i = 0;
if (isServer) then
{
while {_i<count _magsarray} do
{
box1 addmagazinecargo [format ["%1", _magsarray select _i], 1];
sleep 0.1;
_i = _i + 1;
};
};
_i = 0;
if (isServer) then
{
while {_i<count _weaponsarray} do
{
box1 addweaponcargo [format ["%1", _weaponsarray select _i], 1];
sleep 0.1;
_i = _i + 1;
};
};
Adds one magazine or weapon out of the array to the ammobox/vehicle/whatever. In the end, the box should contain pretty much the same stuff that the player has in his inventory.
Hm, I'm not sure whether the "count _weaponsarray" should be "(count _weaponsarray)-1" instead. Because when _i is zero and count is five, then the while-loop will be executed six instead of five times. You may want to try that out.
Good day,
mr_book