mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-15 13:26:39 +03:00
Add DZE_EVRHandleVehicles for EVR Storms
The EVR Storm turns off the vehicle engine if enabled.
This commit is contained in:
@@ -384,7 +384,9 @@ fnc_evr = {
|
||||
disableUserInput false; disableUserInput false;
|
||||
disableUserInput true; disableUserInput true;
|
||||
|
||||
if (player == vehicle player) then {
|
||||
local _vehicle = vehicle player;
|
||||
|
||||
if (player == _vehicle) then {
|
||||
if (_hasAPSI) then {
|
||||
player switchMove "";
|
||||
[objNull, player, rswitchMove, ""] call RE;
|
||||
@@ -392,6 +394,22 @@ fnc_evr = {
|
||||
player switchMove "AcinPercMrunSnonWnonDf_agony"; // knockout animation
|
||||
[objNull, player, rSwitchMove, "AcinPercMrunSnonWnonDf_agony"] call RE;
|
||||
};
|
||||
} else {
|
||||
if (DZE_EVRHandleVehicles && {isEngineOn _vehicle && ((speed _vehicle) > 10)}) then {
|
||||
local _fuel = fuel _vehicle;
|
||||
_vehicle setFuel 0;
|
||||
player action ["engineOff",_vehicle];
|
||||
_vehicle setFuel _fuel;
|
||||
} else {
|
||||
if !(_hasAPSI) then {
|
||||
player action ["eject",_vehicle];
|
||||
[] spawn {
|
||||
uiSleep 3;
|
||||
player switchMove "AcinPercMrunSnonWnonDf_agony"; // knockout animation
|
||||
[objNull, player, rSwitchMove, "AcinPercMrunSnonWnonDf_agony"] call RE;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
uiSleep 0.1;
|
||||
|
||||
Reference in New Issue
Block a user