?!(local server): exit
?(wahpool <= 0): whq1 sidechat "Attack Helicopter reserves depleted." and exit
?(wahcnt1 < 4): goto "makeAH64"

#makeAH64
~30
?(wahcnt1 >= 4): exit
_num = random 3
?_num < 1: goto "makeA"
?_num < 2: goto "makeDnr"
?_num < 3: goto "makeD"

#makeD
?(wahcnt1 >= 4): exit
_wah = "fz_ah64d" createVehicle getmarkerpos "respawn_west"
wahpool = wahpool - 1
_wah setpos getpos pad1
goto "counts"

#makeA
?(wahcnt1 >= 4): exit
_wah = "fz_ah64a" createVehicle getmarkerpos "respawn_west"
wahpool = wahpool - 1
_wah setpos getpos pad2
goto "counts"

#makeDnr
?(wahcnt1 >= 4): exit
_wah = "fz_ah64dNR" createVehicle getmarkerpos "respawn_west"
wahpool = wahpool - 1
_wah setpos getpos pad3
goto "counts"

#counts
wahcnt1 = wahcnt1 + 1

#loop
~0.001
?!(alive _wah): goto "quit"
goto "loop"


#quit
wahcnt1 = wahcnt1 - 1
[leader groupbanshee,getpos leader groupbanshee select 0,getpos leader groupbanshee select 1] exec "scripts\position.sqs"
~10
deletevehicle _wah
exit