try this sample out of one of my demo missions i use it to drop a car from a chopper chute opens ar the start of the script but can be called any time with
[ammoboxname]execVM"paradrop.sqf"
// AmmoBox filler + Dropper
// By ArMaTeC
//
// Usage: res=[(getpos [location]),AmmoBoxWest]execVM"ammobox.sqf";
// Edited: 30.06.07 23:41
_location = _this select 0;
_boxtype = _this select 1;
_Upos = _location;
_SPheight = 18;
_cpara =
{
private ["_grp","_u","_pos"];
_grp=_this select 0;
_pos=_this select 1;
_u=_grp createvehicle _pos;
_u setpos _pos;
_u
};
_ammobox=[_boxtype,[_location select 0,_location select 1,(_location select 2)+_SPheight]] call _cpara;
sleep 0.001;
_Offsetx = 0;
_Offsety = 0;
_Offsetz = -1.5;// how far below you wont the ammobox
_para=["ParachuteG",(getpos _ammobox)] call _cpara;
player setpos getpos _ammobox;
_pUpos= GetPos _ammobox;
_pux=_pUpos Select 0;
_puy=_pUpos Select 1;
_puz=_pUpos Select 2;
while {_puz >= 15} do
{
hint format["%1",_puz];
_mpvol = Velocity _para;
_pvolx = _mpvol select 0;
_pvoly = _mpvol select 1;
_pvolz = _mpvol select 2;
_ammobox SetPos (_para ModelToWorld [_Offsetx,_Offsety,_Offsetz]);
_ammobox SetVelocity [_pvolx,_pvoly,_pvolz -1];
_VUp=VectorUp _para;
_VDir=VectorDir _para;
_ammobox SetvectorDir _VDir;
_ammobox SetvectorUp _VUp;
sleep 0.001;
_pUpos= GetPos _ammobox;
_puz=_pUpos Select 2;
hint format["%1",_puz];
};
_ammobox SetPos (_para ModelToWorld [_Offsetx,_Offsety,_Offsetz]);
deleteVehicle _para;
_boxname = _ammobox;
while {true} do
{
_waitrnd = random 600;
_count = 10+random 20;
_West_weap = ["M16A2","M16A2GL","M16A4","M16A4_GL","M16A4_ACG","M16A4_ACG_GL","M4","M4GL","M4AIM","M4A1SD","M4SPR","M4A1","M4A1GL","G36K","G36C","G36A","MP5A5","MP5SD","M249","M240","M24","M107","M9","M9SD","M136","JAVELIN","STINGER"];
_East_weap = ["AK74","AK74GL","AKS74U","AKS74UN","AKS74PSO","PK","SVD","KSVK","MAKAROV","MAKAROVSD","RPG7V","STRELA"];
_West_ammo = ["30Rnd_556x45_Stanag","20Rnd_556x45_Stanag","30Rnd_556x45_StanagSD","30Rnd_556x45_G36","30Rnd_9x19_MP5","30Rnd_9x19_MP5SD","200Rnd_556x45_M249","100Rnd_762x51_M240","5Rnd_762x51_M24","10Rnd_127x99_M107","15Rnd_9x19_M9","15Rnd_9x19_M9SD","M136","JAVELIN","STINGER","FlareWhite_M203","FlareGreen_M203","FlareRed_M203","FlareYellow_M203","1Rnd_HE_M203"];
_East_ammo = ["30Rnd_545x39_AK","30Rnd_545x39_AKSD","100Rnd_762x54_PK","10Rnd_762x54_SVD","5Rnd_127x108_KSVK","8Rnd_9x18_Makarov","8Rnd_9x18_MakarovSD","PG7V","PG7VR","FlareWhite_GP25","FlareGreen_GP25","FlareRed_GP25","FlareYellow_GP25","1Rnd_HE_GP25"];
_Misc_ammo = ["HandGrenade","HandGrenadeTimed","SmokeShell","SmokeShellRed","SmokeShellGreen","PipeBomb","TimeBomb","Mine","MineE","Laserbatteries"];
{_boxname removeWeapon _x;} forEach Weapons _boxname;
{_boxname removeMagazine _x;} forEach magazines _boxname;
{_boxname addWeaponCargo [_x,_count];} forEach _West_weap;
{_boxname addWeaponCargo [_x,_count];} forEach _East_weap;
{_boxname addMagazineCargo [_x,_count];} forEach _West_ammo;
{_boxname addMagazineCargo [_x,_count];} forEach _East_ammo;
{_boxname addMagazineCargo [_x,_count];} forEach _Misc_ammo;
_wait = 60 + _waitrnd;
sleep _wait;
_reWait = _time + 60;
waitUntil {(!Alive _boxname) && (_time < _reWait);};
_boxname setdammage 0;
};