Added fastrope keybind (#5606)

* Add fastrope keybind

* Add canInteractWith checks

* Fix player -> ACE_player
This commit is contained in:
BaerMitUmlaut 2017-10-14 18:55:48 +02:00 committed by PabstMirror
parent 750382ff67
commit c211cbf82b

View File

@ -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 {};