diff options
| author | hybrid <hybrid@hybridlabs.pro> | 2026-06-11 19:53:22 +0300 |
|---|---|---|
| committer | hybrid <hybrid@hybridlabs.pro> | 2026-06-11 19:53:22 +0300 |
| commit | c055d44dcdb87e8db49fb23e632fc086aa44cce6 (patch) | |
| tree | 7ac98d865915930bebc86b36b512a859c31538e5 /Client/Module/CM/CM_Countermeasures.sqf | |
| download | a2wf_zargabad-c055d44dcdb87e8db49fb23e632fc086aa44cce6.tar.gz a2wf_zargabad-c055d44dcdb87e8db49fb23e632fc086aa44cce6.tar.bz2 a2wf_zargabad-c055d44dcdb87e8db49fb23e632fc086aa44cce6.zip | |
init
Diffstat (limited to '')
| -rw-r--r-- | Client/Module/CM/CM_Countermeasures.sqf | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Client/Module/CM/CM_Countermeasures.sqf b/Client/Module/CM/CM_Countermeasures.sqf new file mode 100644 index 0000000..795108b --- /dev/null +++ b/Client/Module/CM/CM_Countermeasures.sqf @@ -0,0 +1,22 @@ +Private ["_flarecount","_i","_isActive","_missile","_type","_vehicle"];
+_vehicle = _this select 0;
+_missile = _this select 1;
+
+if (alive _vehicle && (getPos _vehicle) select 2 > 5) then {
+ _isActive = _vehicle getvariable "FlareActive";
+ _type = getNumber (configFile >> "CfgAmmo" >> _missile >> "AirLock");
+ if ((_type == 1) && (! _isActive)) then {
+ private ["_flarecount"];
+ _vehicle setVariable ["FlareActive", true];
+ if ((driver _vehicle) == player) then {_vehicle vehicleChat "WARNING: incomming missile!"};
+ _flarecount = _vehicle getVariable "FlareCount";
+ if (_flarecount > 0) then {
+ _this Spawn CM_Spoofing;
+ for [{_i=0}, {_i<8}, {_i=_i+1}] do {
+ [_vehicle] Call CM_Flares;
+ sleep 0.3;
+ };
+ };
+ _vehicle setVariable ["FlareActive", false];
+ };
+};
\ No newline at end of file |
