diff --git a/addons/fastroping/XEH_postInit.sqf b/addons/fastroping/XEH_postInit.sqf index 1efb204247..72ded1b267 100644 --- a/addons/fastroping/XEH_postInit.sqf +++ b/addons/fastroping/XEH_postInit.sqf @@ -8,7 +8,21 @@ [FUNC(fastRopeServerPFH), 0, _this] call CBA_fnc_addPerFrameHandler; }] call CBA_fnc_addEventHandler; +// Keybinds +["ACE3 Vehicles", QGVAR(fastRope), localize LSTRING(Interaction_fastRope), { + if ((vehicle ACE_player) == ACE_player) exitWith {false}; + if (!([ACE_player, vehicle ACE_player, []] call EFUNC(common,canInteractWith))) exitWith {false}; + if ([ACE_player, vehicle ACE_player] call FUNC(canFastRope)) then { + [ACE_player, vehicle ACE_player] call FUNC(fastRope); + true + } else { + false + }; +}, ""] call CBA_fnc_addKeybind; + ["ACE3 Vehicles", QGVAR(cutRopes), localize LSTRING(Interaction_cutRopes), { + if ((vehicle ACE_player) == ACE_player) exitWith {false}; + if (!([ACE_player, vehicle ACE_player, []] call EFUNC(common,canInteractWith))) exitWith {false}; if ([vehicle ACE_player] call FUNC(canCutRopes)) then { [vehicle ACE_player] call FUNC(cutRopes); true @@ -18,7 +32,6 @@ }, {false}] call CBA_fnc_addKeybind; - #ifdef DRAW_FASTROPE_INFO addMissionEventHandler ["Draw3D", { if (!(cursorObject isKindOf "Helicopter")) exitWith {};