Added collision lights keybind (#5646)

This commit is contained in:
Tim Beswick 2017-10-26 05:11:35 +01:00 committed by PabstMirror
parent 8c1952d15f
commit 1a2e2848ad
2 changed files with 15 additions and 0 deletions

View File

@ -196,6 +196,18 @@ if (!hasInterface) exitWith {};
{false},
[10, [false, false, false]], false] call CBA_fnc_addKeybind; //9 Key
["ACE3 Vehicles", QGVAR(CollisionLights), localize LSTRING(CollisionLights), {
// Conditions: canInteract
if (!([ACE_player, vehicle ACE_player, []] call EFUNC(common,canInteractWith))) exitWith {false};
// Conditions: specific
if ((ACE_player isEqualTo (vehicle ACE_player)) || {ACE_player != (driver (vehicle ACE_player))}) exitWith {false};
// Statement
(vehicle ACE_player) setCollisionLight !(isCollisionLightOn (vehicle ACE_player));
true
},
{false},
[0, [false, false, false]]] call CBA_fnc_addKeybind;
// Register fire event handler
["ace_firedPlayer", DFUNC(throwGrenade)] call CBA_fnc_addEventHandler;

View File

@ -369,5 +369,8 @@
<Chinesesimp>发射烟雾发射器</Chinesesimp>
<Chinese>發射煙霧發射器</Chinese>
</Key>
<Key ID="STR_ACE_WeaponSelect_CollisionLights">
<English>Toggle Collision Lights</English>
</Key>
</Package>
</Project>