Hallo,
Habe gerade ebend meine keyhandler bissen umgeschrieben und jetzt kann ich nix mehr machen
Spoiler anzeigen
//F Key
case 33: {
private _side = _vehicle getVariable[ "side", sideUnknown ];
if( _vehicle isEqualTo player && _shift && !_alt && !_ctrlKey ) then {
_handled = true;
if( !(playerSide isEqualTo civilian) && (side _cursorObject) isEqualTo civilian ) exitWith {};
// Some pre-conditions need to be met, otherwise the cooldown cripples the effectivity of the action
if( time - life_cooldown > 1 && { !(isNull _cursorObject) } && { isPlayer _cursorObject } ) then {
life_cooldown = time;
[_cursorObject] call life_fnc_knockoutAction;
};
};
if( !(_vehicle isEqualTo player) && { (driver _vehicle) isEqualTo player } && { _side in [west,independent] } && { time - life_cooldown > 2 } ) then {
life_cooldown = time;
_message = "";
_duration = 0;
_sirenSound = "";
switch ( true ) do {
// F = Standard Siren
case( _side == west && !_alt && !_ctrlKey && !_shift {
_message = "Sirene";
_sirenSound = "sirencoplong";
_duration = 3.8;
};
// Shift+F = Short siren
case( _side == west && !_alt && !_ctrlKey && _shift {
_message = "Heulen";
_sirenSound = "sirencop";
_duration = 3.7;
};
// Strg+F = Megaphon voice
case( _side == west && playerSide == west && !_alt && _ctrlKey && !_shift {
_message = "Warnung";
_sirenSound = "warningcop";
_duration = 8;
};
case( _side == independent && !_alt && !_ctrlKey && !_shift {
_message = "Sirene";
_sirenSound = "sirenmedic" ;
_duration = 3;
};
};
if( _sirenSound isEqualTo "" ) exitWith {};
_state = _vehicle getVariable[ _sirenSound, false];
_vehicle setVariable[ _sirenSound, !_state, true ];
if( _state ) then {
titleText[_message + " AUS", "PLAIN"];
} else {
titleText[_message + " AN", "PLAIN"];
[_vehicle, _sirenSound, _duration] remoteExec ["life_fnc_siren", -2 ];
};
};
};
// Red Gull (ALT + R)
if( !_shift && _alt && !_ctrlKey ) then {
_handled = true;
[ "redgull" ] call life_fnc_useItem;
};
};
MFG Mabu