ACE3/addons/sitting/XEH_clientInit.sqf
2016-05-24 14:13:11 +01:00

19 lines
699 B
Plaintext

#include "script_component.hpp"
// Exit on Headless
if (!hasInterface) exitWith {};
["ace_settingsInitialized", {
TRACE_1("SettingInit", GVAR(enable));
//If not enabled, then do not add CanInteractWith Condition or event handlers:
if (!GVAR(enable)) exitWith {};
// Add interaction menu exception
["isNotSitting", {isNil {(_this select 0) getVariable QGVAR(isSitting)}}] call EFUNC(common,addCanInteractWithCondition);
// Handle interruptions
["ace_medical_onUnconscious", {_this call DFUNC(handleInterrupt)}] call CBA_fnc_addEventHandler;
["ace_setHandcuffed", {_this call DFUNC(handleInterrupt)}] call CBA_fnc_addEventHandler;
}] call CBA_fnc_addEventHandler;