summaryrefslogtreecommitdiffstats
path: root/Server/Support/Support_UAV.sqf
diff options
context:
space:
mode:
authorhybrid <hybrid@hybridlabs.pro>2026-06-11 19:55:24 +0300
committerhybrid <hybrid@hybridlabs.pro>2026-06-11 19:55:24 +0300
commit628d33984d9228f1781d13a65fbb80f35facc899 (patch)
treecd909141f87e14f22c3511549a9bc067d9ff8b50 /Server/Support/Support_UAV.sqf
downloada2wf_sara-628d33984d9228f1781d13a65fbb80f35facc899.tar.gz
a2wf_sara-628d33984d9228f1781d13a65fbb80f35facc899.tar.bz2
a2wf_sara-628d33984d9228f1781d13a65fbb80f35facc899.zip
init
Diffstat (limited to 'Server/Support/Support_UAV.sqf')
-rw-r--r--Server/Support/Support_UAV.sqf20
1 files changed, 20 insertions, 0 deletions
diff --git a/Server/Support/Support_UAV.sqf b/Server/Support/Support_UAV.sqf
new file mode 100644
index 0000000..aded9a0
--- /dev/null
+++ b/Server/Support/Support_UAV.sqf
@@ -0,0 +1,20 @@
+Private["_args","_driver","_gunner","_playerTeam","_side","_uav"];
+
+_args = _this;
+_side = _args select 1;
+
+_uav = (_args select 2);
+_driver = driver _uav;
+_gunner = gunner _uav;
+_playerTeam = (_args select 3);
+
+diag_log Format["[WFBE (INFORMATION)][frameno:%4 | ticktime:%5] Server_HandleSpecial: The %1 %2 Team (Leader: %3) has called an UAV",str _side,_playerTeam,name (leader _playerTeam),diag_frameno,diag_tickTime];
+
+while {true} do {
+ sleep 5;
+ if (!(isPlayer (leader _playerTeam)) || !alive _uav) exitWith {};
+};
+
+if (!isNull _driver) then {if (alive _driver) then {_driver setDammage 1};if (!(_driver in trashQueu)) then {trashQueu = trashQueu + [_driver];_driver Spawn TrashObject}};
+if (!isNull _gunner) then {if (alive _gunner) then {_gunner setDammage 1};if (!(_gunner in trashQueu)) then { trashQueu = trashQueu + [_gunner];_gunner Spawn TrashObject}};
+if (!isNull _uav) then {if (alive _uav) then {_uav setDammage 1};if (!(_uav in trashQueu)) then { trashQueu = trashQueu + [_uav];_uav Spawn TrashObject}}; \ No newline at end of file