mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
eject player from vehicle with no drivers if keys pressed: esc, tab, del, f4
This commit is contained in:
@@ -7,9 +7,18 @@ if (_dikCode in[0x02,0x03,0x04,0x58,0x57,0x44,0x43,0x42,0x41,0x40,0x3F,0x3E,0x3D
|
|||||||
_handled = true;
|
_handled = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
if ((_dikCode == 0x3E or _dikCode == 0x0F or _dikCode == 0xD3) and (diag_tickTime - dayz_lastCheckBit > 10)) then {
|
if ((_dikCode == 0x3E or _dikCode == 0x0F or _dikCode == 0xD3)) then {
|
||||||
dayz_lastCheckBit = diag_tickTime;
|
if(diag_tickTime - dayz_lastCheckBit > 10) then {
|
||||||
call dayz_forceSave;
|
dayz_lastCheckBit = diag_tickTime;
|
||||||
|
call dayz_forceSave;
|
||||||
|
};
|
||||||
|
call dayz_EjectPlayer;
|
||||||
|
};
|
||||||
|
|
||||||
|
// esc
|
||||||
|
if (_dikCode == 0x01) then {
|
||||||
|
DZE_cancelBuilding = true;
|
||||||
|
call dayz_EjectPlayer;
|
||||||
};
|
};
|
||||||
|
|
||||||
// surrender
|
// surrender
|
||||||
@@ -176,9 +185,4 @@ if (_dikCode == 0x39 or (_dikCode in actionKeys "User19")) then {
|
|||||||
DZE_5 = true;
|
DZE_5 = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
// esc
|
|
||||||
if (_dikCode == 0x01) then {
|
|
||||||
DZE_cancelBuilding = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
_handled
|
_handled
|
||||||
@@ -504,6 +504,18 @@ if (!isDedicated) then {
|
|||||||
dayz_thirst = dayz_thirst + (_this select 1);
|
dayz_thirst = dayz_thirst + (_this select 1);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
dayz_EjectPlayer = {
|
||||||
|
// check if player in vehicle
|
||||||
|
_vehicle = vehicle player;
|
||||||
|
_inVehicle = (_vehicle != player);
|
||||||
|
if(_inVehicle) then {
|
||||||
|
_noDriver = ((_vehicle emptyPositions "driver") > 0);
|
||||||
|
if (_noDriver) then {
|
||||||
|
player action [ "eject", (vehicle player)];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
player_sumMedical = {
|
player_sumMedical = {
|
||||||
private["_character","_wounds","_legs","_arms","_medical"];
|
private["_character","_wounds","_legs","_arms","_medical"];
|
||||||
_character = _this;
|
_character = _this;
|
||||||
|
|||||||
Reference in New Issue
Block a user