From ac8ff45d44775a20e679095196a14d0f3feadaae Mon Sep 17 00:00:00 2001 From: commy2 Date: Wed, 18 Mar 2015 11:29:58 +0100 Subject: [PATCH] lock / unlock events --- addons/common/XEH_postInit.sqf | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/addons/common/XEH_postInit.sqf b/addons/common/XEH_postInit.sqf index 6398f6aa98..6fec7a1a20 100644 --- a/addons/common/XEH_postInit.sqf +++ b/addons/common/XEH_postInit.sqf @@ -24,6 +24,15 @@ if (hasInterface) then { ["fixFloating", DFUNC(fixFloating)] call FUNC(addEventhandler); ["fixPosition", DFUNC(fixPosition)] call FUNC(addEventhandler); +["lockVehicle", { + _this setVariable [QGVAR(lockStatus), locked _this]; + _this lock 2; +}] call FUNC(addEventhandler); + +["unlockVehicle", { + _this lock (_this getVariable [QGVAR(lockStatus), locked _this]); +}] call FUNC(addEventhandler); + // hack to get PFH to work in briefing [QGVAR(onBriefingPFH), "onEachFrame", { if (time > 0) exitWith {