Last active
July 25, 2020 20:00
-
-
Save commy2/5121471677578719c76a55018c59c875 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// description.ext | |
class Extended_DisplayLoad_EventHandlers { | |
class RscDisplayAVTerminal { | |
Mission = "'Mission_UAVTerminalOpened' call CBA_fnc_localEvent"; | |
}; | |
}; | |
// init.sqf | |
Mission_isUAVControlTaken = false; | |
{ | |
private _unit = player; | |
private _uavControl = UAVControl getConnectedUAV _unit; | |
private _index = _uavControl find _unit; | |
if (_index != -1 && {_uavControl select (_index + 1) != ""}) then { | |
if (!Mission_isUAVControlTaken) then { | |
Mission_isUAVControlTaken = true; | |
"Mission_UAVControlTaken" call CBA_fnc_localEvent; | |
}; | |
} else { | |
Mission_isUAVControlTaken = false; | |
}; | |
} call CBA_fnc_addPerFrameHandler; | |
["Mission_UAVTerminalOpened", { | |
systemChat str ["UAV Terminal", diag_frameNo]; | |
}] call CBA_fnc_addEventHandler; | |
["Mission_UAVControlTaken", { | |
systemChat str ["UAV Control", diag_frameNo]; | |
}] call CBA_fnc_addEventHandler; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment