_chopper = vehicle player

?(repair == 1): goto "repair"
?!(_chopper hasweapon "fz_m230" or _chopper hasweapon "fz_lbhf" or _chopper hasweapon "fz_lbhfeight" or _chopper hasweapon "fz_aim92" or _chopper hasweapon "fz_275herp" or _chopper hasweapon "fz_275herp2"): whq1 sidechat "Error! Missing weaponry! Check damage first." and exit

?(load8hf38rkt == 1): goto "loadmix"
?(load16 == 1): goto "load16"
?(load76 == 1): goto "loadrock"
?(loadsting == 1): goto "loadsting"
?(reloadgun == 1): goto "loadgun"

exit

#loadmix
_chopper vehiclechat "Loading 8 Hellfires and 38 rockets..."
_chopper removeweapon "fz_275herp2"
_chopper removeweapon "fz_lbhfeight"
_chopper removeweapon "fz_lbhf"
_chopper removemagazine "fz_275herp2"
_chopper removemagazine "fz_lbhfeight"
_chopper removemagazine "fz_lbhf"
_chopper removemagazine "fz_275herp"
_chopper removemagazine "fz_275mpsm"
_chopper removemagazine "fz_275flec"
_chopper removemagazine "fz_275herp14"
_chopper removemagazine "fz_275mpsm12"
_chopper removemagazine "fz_275flec12"

_chopper addmagazine "fz_lbhfeight"
_chopper addmagazine "fz_275herp"
_chopper addweapon "fz_lbhfeight"
_chopper addweapon "fz_275herp"
load8hf38rkt = 0
exit

#load16
_chopper vehiclechat "Loading 16 Hellfires..."
_chopper removeweapon "fz_275herp2"
_chopper removeweapon "fz_275herp"
_chopper removeweapon "fz_lbhfeight"
_chopper removeweapon "fz_lbhf"
_chopper removemagazine "fz_275herp2"
_chopper removemagazine "fz_275herp"
_chopper removemagazine "fz_lbhfeight"
_chopper removemagazine "fz_lbhf"

_chopper removeaction loadrktmix38;
_chopper removeaction loadmpsm38;
_chopper removeaction loadflec38;
_chopper removeaction loadhe38;
_chopper removeaction loadhe76;
_chopper removeaction loadmpsm76;
_chopper removeaction loadflec76;

_chopper addmagazine "fz_lbhf"
_chopper addweapon "fz_lbhf"
load16 = 0
exit

#loadrock
_chopper vehiclechat "Loading 76 rockets..."
_chopper removeweapon "fz_275herp2"
_chopper removeweapon "fz_275herp"
_chopper removeweapon "fz_lbhfeight"
_chopper removeweapon "fz_lbhf"
_chopper removemagazine "fz_275herp2"
_chopper removemagazine "fz_275herp"
_chopper removemagazine "fz_lbhfeight"
_chopper removemagazine "fz_lbhf"

_chopper addmagazine "fz_275herp2"
_chopper addweapon "fz_275herp2"
load76 = 0
exit

#loadsting
_chopper vehiclechat "Loading 4 Stingers..."
_chopper removeweapon "fz_aim92"
_chopper removemagazine "fz_aim92"

_chopper addmagazine "fz_aim92"
_chopper addweapon "fz_aim92"

loadsting = 0

exit

#repair
_chopper vehiclechat "Repairing damage and refueling..."
_chopper setdammage 0
_chopper setfuel 1

repair = 0

exit

#loadgun
_chopper vehiclechat "Reloading Chaingun..."
_chopper removemagazine "fz_m230a"
_chopper addmagazine "fz_m230a"

reloadgun = 0

exit