Skip to content

Instantly share code, notes, and snippets.

@commy2
Last active July 25, 2020 20:00
Show Gist options
  • Save commy2/5121471677578719c76a55018c59c875 to your computer and use it in GitHub Desktop.
Save commy2/5121471677578719c76a55018c59c875 to your computer and use it in GitHub Desktop.
// 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