Skip to content

Instantly share code, notes, and snippets.

@commy2
Created August 21, 2019 03:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save commy2/deb2f790deb1a9b8509fceebfb0443ab to your computer and use it in GitHub Desktop.
Save commy2/deb2f790deb1a9b8509fceebfb0443ab to your computer and use it in GitHub Desktop.
// init.sqf
private _fnc_kickOutPilot = {
params ["", "", "_vehicle"];
if !(_vehicle isKindOf "Air") exitWith {};
private _pilot = driver _vehicle;
if (!local _pilot) exitWith {};
if (rankId _pilot < 3) then {
_pilot action ["GetOut", _vehicle];
};
};
["CAManBase", "GetInMan", _fnc_kickOutPilot] call CBA_fnc_addClassEventHandler;
["CAManBase", "SeatSwitchedMan", _fnc_kickOutPilot] call CBA_fnc_addClassEventHandler;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment