diff --git a/SQF/dayz_code/Configs/CfgWeapons.hpp b/SQF/dayz_code/Configs/CfgWeapons.hpp
index 5eccaef35..577ea26bb 100644
--- a/SQF/dayz_code/Configs/CfgWeapons.hpp
+++ b/SQF/dayz_code/Configs/CfgWeapons.hpp
@@ -74,7 +74,7 @@ class CfgWeapons {
class PK;
class PK_DZ: PK {
type = "1";
- }
+ };
class Default {
canlock = 0;
diff --git a/SQF/dayz_code/actions/veh_seatActions.sqf b/SQF/dayz_code/actions/veh_seatActions.sqf
new file mode 100644
index 000000000..b4c51f382
--- /dev/null
+++ b/SQF/dayz_code/actions/veh_seatActions.sqf
@@ -0,0 +1,40 @@
+/*
+ Created exclusively for ArmA2:OA - DayZMod and DayZ Epoch. Script by icomrade.
+ permission is required to use, alter and/or distribute from the author or project leader.
+*/
+private ["_array","_count","_action","_driver","_vehicle","_vehicleType","_emptySeat","_emptyGun"];
+_array = _this select 3;
+_action = _array select 0;
+_driver = _array select 1;
+_vehicle = vehicle player;
+_vehicleType = typeOf _vehicle;
+_emptySeat = count (assignedCargo _vehicle);
+_count = count (configFile >> "CfgVehicles" >> _vehicleType >> "Turrets");
+_emptyGun = ((_vehicle emptyPositions "Gunner") - _count);
+
+switch _action do {
+ case "MoveToPilot": {
+ if (((_vehicle emptyPositions "Driver") == 0) and (!alive _driver)) then {
+ _driver action ["EJECT", _vehicle];
+ sleep 0.5; //wait for ejection
+ };
+ if ((_vehicle emptyPositions "Driver") > 0) then {
+ player action [_action, _vehicle];
+ };
+ };
+ case "MoveToCargo": {
+ if ((_vehicle emptyPositions "Cargo") > 0) then {
+ player action [_action, _vehicle, _emptySeat];
+ };
+ };
+ case "MoveToTurret": {
+ if ((_vehicle emptyPositions "Gunner") > 0) then {
+ player action [_action, _vehicle, [abs(_emptyGun)]];
+ };
+ };
+ case "MoveToCommander": {
+ if ((_vehicle emptyPositions "Commander") > 0) then {
+ player action [_action, _vehicle];
+ };
+ };
+};
\ No newline at end of file
diff --git a/SQF/dayz_code/compile/fn_damageActions.sqf b/SQF/dayz_code/compile/fn_damageActions.sqf
index f84777c3a..4974dfc1d 100644
--- a/SQF/dayz_code/compile/fn_damageActions.sqf
+++ b/SQF/dayz_code/compile/fn_damageActions.sqf
@@ -4,7 +4,7 @@ scriptName "Functions\misc\fn_damageActions.sqf";
- Function
- [] call fnc_usec_damageActions;
************************************************************/
-private ["_weaponName","_action","_turret","_weapons","_assignedRole","_action1","_action2","_x","_vehicle","_unit","_vehType","_displayName","_ammoQty","_ammoSerial","_weapon","_magTypes","_type","_typeVeh","_index","_inventory","_unitTo","_isEngineer","_vehClose","_hasVehicle","_unconscious","_lowBlood","_injured","_inPain","_legsBroke","_armsBroke","_charID","_friendlies","_playerMagazines","_hasBandage","_hasEpi","_hasMorphine","_hasBlood","_hasToolbox","_hasJerry","_hasJerryE","_hasWire","_hasPainkillers","_unconscious_crew","_patients","_crew","_menClose","_hasPatient","_inVehicle","_isClose","_bag","_classbag","_isDisallowRefuel","_hasBarrel","_hasBarrelE"];
+private ["_action","_weaponName","_turret","_weapons","_assignedRole","_driver","_action1","_action2","_x","_vehicle","_unit","_vehType","_type","_typeVeh","_isDisallowRefuel","_vehClose","_hasVehicle","_unconscious","_lowBlood","_injured","_inPain","_legsBroke","_armsBroke","_charID","_friendlies","_playerMagazines","_hasBandage","_hasEpi","_hasMorphine","_hasBlood","_hasJerry","_hasBarrel","_hasJerryE","_hasBarrelE","_hasPainkillers","_unconscious_crew","_patients","_crew","_menClose","_hasPatient","_inVehicle","_isClose"];
disableSerialization;
@@ -15,17 +15,48 @@ _hasPatient = alive _menClose;
_vehicle = vehicle player;
_inVehicle = (_vehicle != player);
_isClose = ((player distance _menClose) < ((sizeOf typeOf _menClose) / 2));
-_bag = unitBackpack player;
-_classbag = typeOf _bag;
+//_bag = unitBackpack player;
+//_classbag = typeOf _bag;
if (_inVehicle) then {
r_player_lastVehicle = _vehicle;
_assignedRole = assignedVehicleRole player;
+ _driver = driver (vehicle player);
if (str (_assignedRole) != str (r_player_lastSeat)) then {
call r_player_removeActions2;
};
- if (!r_player_unconscious && !r_action2) then {
- r_player_lastSeat = _assignedRole;
+ if (!r_player_unconscious && !r_action2) then {
+ r_player_lastSeat = _assignedRole;
+ if (_inVehicle) then {
+ //allow switch to pilot
+ if (((_assignedRole select 0) != "driver") and ((!alive _driver) or ((_vehicle emptyPositions "Driver") > 0))) then {
+ if (_vehicle isKindOf "helicopter") then {
+ _action = _vehicle addAction [localize "STR_EPOCH_PLAYER_308A", "\z\addons\dayz_code\actions\veh_seatActions.sqf",["MoveToPilot",_driver], 0, false, true];
+ } else {
+ _action = _vehicle addAction [localize "STR_EPOCH_PLAYER_308", "\z\addons\dayz_code\actions\veh_seatActions.sqf",["MoveToPilot",_driver], 0, false, true];
+ };
+ r_player_actions2 set [count r_player_actions2,_action];
+ r_action2 = true;
+ };
+ //allow switch to cargo
+ if (((_assignedRole select 0) != "cargo") and ((_vehicle emptyPositions "Cargo") > 0)) then {
+ _action = _vehicle addAction [localize "STR_EPOCH_PLAYER_309", "\z\addons\dayz_code\actions\veh_seatActions.sqf",["MoveToCargo",_driver], 0, false, true];
+ r_player_actions2 set [count r_player_actions2,_action];
+ r_action2 = true;
+ };
+ //allow switch to gunner
+ if (((_assignedRole select 0) != "Turret") and ((_vehicle emptyPositions "Gunner") > 0)) then {
+ _action = _vehicle addAction [localize "STR_EPOCH_PLAYER_310", "\z\addons\dayz_code\actions\veh_seatActions.sqf",["MoveToTurret",_driver], 0, false, true];
+ r_player_actions2 set [count r_player_actions2,_action];
+ r_action2 = true;
+ };
+ //allow switch to commander
+ if (((assignedCommander _vehicle) != player) and ((_vehicle emptyPositions "Commander") > 0)) then {
+ _action = _vehicle addAction [localize "STR_EPOCH_PLAYER_311", "\z\addons\dayz_code\actions\veh_seatActions.sqf",["MoveToTurret",_driver], 0, false, true];
+ r_player_actions2 set [count r_player_actions2,_action];
+ r_action2 = true;
+ };
+ };
if (count _assignedRole > 1) then {
_turret = _assignedRole select 1;
_weapons = _vehicle weaponsTurret _turret;
@@ -62,13 +93,13 @@ if (!isNull _menClose and _hasPatient and !r_drag_sqf and !r_action and !_inVehi
_hasEpi = "ItemEpinephrine" in _playerMagazines;
_hasMorphine = "ItemMorphine" in _playerMagazines;
_hasBlood = "ItemBloodbag" in _playerMagazines;
- _hasToolbox = "ItemToolbox" in items player;
+ //_hasToolbox = "ItemToolbox" in items player;
_hasJerry = "ItemJerrycan" in _playerMagazines;
_hasBarrel = "ItemFuelBarrel" in _playerMagazines;
_hasJerryE = "ItemJerrycanEmpty" in _playerMagazines;
_hasBarrelE = "ItemFuelBarrelEmpty" in _playerMagazines;
//_hasEtool = "ItemEtool" in weapons player;
- _hasWire = "ItemWire" in _playerMagazines;
+ //_hasWire = "ItemWire" in _playerMagazines;
_hasPainkillers = "ItemPainkiller" in _playerMagazines;
//Allow player to drag
diff --git a/SQF/dayz_code/compile/fn_unconscious.sqf b/SQF/dayz_code/compile/fn_unconscious.sqf
index 070a8791b..222479c67 100644
--- a/SQF/dayz_code/compile/fn_unconscious.sqf
+++ b/SQF/dayz_code/compile/fn_unconscious.sqf
@@ -3,6 +3,7 @@ disableSerialization;
if ((!r_player_handler1) and (r_handlerCount == 0)) then {
//Unconscious Meter
_totalTimeout = r_player_timeout;
+ if (_totalTimeout == 0) then { _totalTimeout = 1; }; //Fix for zero divisor
4 cutRsc ["playerStatusWaiting", "PLAIN",0];
_display = uiNamespace getVariable 'DAYZ_GUI_waiting';
_ctrl1 = _display displayCtrl 1400;
diff --git a/SQF/dayz_epoch_b/stringtable.xml b/SQF/dayz_epoch_b/stringtable.xml
index 5ada01e51..449e5c173 100644
--- a/SQF/dayz_epoch_b/stringtable.xml
+++ b/SQF/dayz_epoch_b/stringtable.xml
@@ -5996,6 +5996,56 @@
+
+ To driver's seat
+ To driver's seat
+ Para el asiento del conductor
+ Для сиденья водителя
+ Pour le siège du conducteur
+ Chcete-li sedadla řidiče
+
+
+
+
+ To pilot's seat
+ To pilot's seat
+ Al asiento de piloto
+ Пересесть на место пилота
+ Vers la place conducteur
+ Na místo pilota
+
+
+
+
+ To back seat
+ To back seat
+ Al asiento trasero
+ Пересесть на место пассажира
+ Vers une place passager
+ Na zadní sedadlo
+
+
+
+
+ To gunner's seat
+ To gunner's seat
+ Al asiento del artillero
+ Пересесть на место стрелка
+ Vers la place du tireur
+ Na sedadlo střelce
+
+
+
+
+ To commander's seat
+ To commander's seat
+ Para el asiento del comandante
+ Чтобы сиденье командира
+ Pour le siège du commandant
+ Chcete-li sídlo velitele
+
+
+
Repair Vehicle
Repair Vehicle