this is my mod of the Bedge's Script... (the Pilot was on the player group)
_x = getpos spy1 select 0
_y = getpos spy1 select 1
_dir = getdir spy1
_wep = weapons spy1
_mag = magazines spy1
_dam = damage spy1
removeallweapons(spy2)
[spy1] joingroup "null"
#mags
? (count _mag) == 0 : goto "wep"
_i = _mag select 0
spy2 addmagazine _i
_mag = _mag - _i
goto "mags"
#wep
? (count _wep) == 0 : goto "done"
_i2 = _wep select 0
spy2 addweapon _i2
_wep = _wep - _i2
goto "wep"
#done
spy2 setdammage (_dam)
spy1 setpos [0,0,0]
spy2 setdir _dir
spy2 setpos [_x,_y]
exit
But it is surely Wrong.. I havn't tested it yet..
there is a Way to delete a element of an array whitout knowing the order? like i have tried to do on the "_mag = _mag - _i" thing... becuase [stringA, stringB,stringC,stringD,stringA] - [stringA,stringC] == [stringB,stringD].. but DK if [stringB,stringD] - stringB == [stringD]..