Создаем файл: anti_missile.sqs
_vehicle = _this select 0
_ammo = _this select 1
[_vehicle, _ammo] exec "antiroket_init_fire.sqs" ;debuggingline
#loop
_missile = nearestobject [_vehicle,_ammo]
? _missile distance _vehicle <=60 : goto "antimisslile"
goto "loop"
#antimisslile
;_missile setdir (direction _missile - 2 - random 2)
_missile setdir (direction _missile - 4 - random 2)
goto "loop"
exit
;missile
;9K32
;AA
Создаем файл: antiroket_init_fire.sqs
Quote
_vehicle = _this select 0
_ammo = _this select 1
#loop
_missile = nearestobject [_vehicle,_ammo]
? _missile distance _vehicle <=90: goto "onfire"
goto "loop"
#onfire
[_vehicle, _ammo] exec "flares.sqs"
~2
goto "loop"
Создаем файл: flares.sqs
_vehicle = _this select 0
_count = 0
_vehicle vehicleChat "Тревога, датчики засекли ракету"
#loop
;left
drop["\ca\data\kouleSvetlo","","Billboard",0.05,6,[0,-2,-2],[-random 6,- random 2,0],0,1.8,1,0,[1],[[1,1,0.3,1]],[0,1],0,0,"smokes.sqs","",_vehicle]
;right
drop["\ca\data\kouleSvetlo","","Billboard",0.05,6,[0,-2,-2],[random 6,- random 2,0],0,1.8,1,0,[1],[[1,1,0.3,1]],[0,1],0,0,"smokes.sqs","",_vehicle]
_count = _count+1
~0.07
?_count<10:goto "loop"
exit
Создаем файл: smokes.sqs
;flare smoke
_shade = 0.4 +random 0.5
drop["\ca\data\cl_basic","","Billboard",1,3,_this,[0,0,0],0,1.275,1,0,[0.5,2,4],[[_shade,_shade,_shade,0.9],[0.8,0.8,0.8,0]],[0,1],2.8,1,"","",""]
exit
Далее вызывать скрипт следующим образом:
[vertalet, "M_Stinger_AA"] exec "anti_missile.sqs"
Quote
[ВЕРТАЛЕТ, "Сюда любую ракету от которой надо увернуться"] exec "anti_missile.sqs"
ПЗРК ракеты НАТО,Русские:
M_Stinger_AA
M_Strela_AA