; args: [vehicle, ...]

? !(local LocalServerObject): Exit

_plane = _this select 0;

_driver = driver _plane;
_gunner = gunner _plane;

? isNull (_plane): goto "fatalerror1";

? (isnil ("_driver")): goto "end";
? (isNull _driver): goto "end";
? !(_driver in _plane): goto "end";

_plane engineOn true;
;_plane FlyInHeight 100;
;_driver FlyInHeight 100;

;Hier wollte ich versuchen, dass die KI nicht erst den 'Anlauf' in der Luft machen muss,
;Ist aber schlecht, sonst stehen die Spieler nur an der KI Base und halten mit AA drauf.

;_plane setCaptive true
;_driver setCaptive true
;_gunner setCaptive true

? !(local _plane) || !(alive _plane) : exit

? (dev) : hint format ["Weapons Plane : %1.\n\nMagazines Plane : %2.", weapons _plane,magazines _plane];

;~3

;_plane setCaptive false
;_driver setCaptive false
;_gunner setCaptive false

;_driver setCombatMode "RED"
;_gunner setCombatMode "RED"

_plane setPos [(getpos _plane select 0),(getpos _plane select 1),(getpos _plane select 2) + 1500];

? isNull (_plane): goto "fatalerror2";

~1
? !(local _plane) || !(alive _plane) : exit

;_driver action ["manualFire", _plane]

exit


#end

exit


#fatalerror1

_line = 9

[player,_line] exec "Player\GetInitSpawnPlaneError.sqs"

exit


#fatalerror2

_line = 22

[player,_line] exec "Player\GetInitSpawnPlaneError.sqs"

exit
