abort will now have a 10 second timer.

This commit is contained in:
[VB]AWOL
2013-09-18 03:43:29 -05:00
parent 095d314572
commit 9fe0395138

View File

@@ -9,37 +9,36 @@ private ["_display","_btnRespawn","_btnAbort","_timeOut","_timeMax"];
_btnRespawn ctrlEnable false; _btnRespawn ctrlEnable false;
_btnAbort ctrlEnable false; _btnAbort ctrlEnable false;
_timeOut = 0; _timeOut = 0;
_timeMax = 30; _timeMax = 10;
dayz_lastCheckBit = time; dayz_lastCheckBit = time;
if(r_player_dead) exitWith {_btnAbort ctrlEnable true;}; // if(r_player_dead) exitWith {_btnAbort ctrlEnable true;};
if(r_fracture_legs) exitWith {_btnRespawn ctrlEnable true; _btnAbort ctrlEnable true;}; if(r_fracture_legs) exitWith {_btnRespawn ctrlEnable true; _btnAbort ctrlEnable true;};
//force gear save //force gear save
if (time - dayz_lastCheckBit > 10) then { if (!r_player_dead and time - dayz_lastCheckBit > 10) then {
call dayz_forceSave; call dayz_forceSave;
}; };
while {!isNull _display} do { while {!isNull _display} do {
switch true do { switch true do {
case ({isPlayer _x} count (player nearEntities ["AllVehicles", 6]) > 1) : { case (!r_player_dead and {isPlayer _x} count (player nearEntities ["AllVehicles", 6]) > 1) : {
_btnAbort ctrlEnable false; _btnAbort ctrlEnable false;
cutText [localize "str_abort_playerclose", "PLAIN DOWN"]; cutText [localize "str_abort_playerclose", "PLAIN DOWN"];
}; };
case (_timeOut < _timeMax && count (player nearEntities ["zZombie_Base", 35]) > 0) : { case (!r_player_dead and !canbuild) : {
_btnAbort ctrlEnable false;
cutText [format ["Can Abort in %1", (_timeMax - _timeOut)], "PLAIN DOWN"];
//cutText [format[localize "str_abort_zedsclose",_text, "PLAIN DOWN"];
};
case (!canbuild) : {
_btnAbort ctrlEnable false; _btnAbort ctrlEnable false;
cutText ["Cannot Abort while in a trader city!", "PLAIN DOWN"]; cutText ["Cannot Abort while in a trader city!", "PLAIN DOWN"];
}; };
case (player getVariable["combattimeout", 0] >= time) : { case (!r_player_dead and player getVariable["combattimeout", 0] >= time) : {
_btnAbort ctrlEnable false; _btnAbort ctrlEnable false;
//cutText ["Cannot Abort while in combat!", "PLAIN DOWN"]; //cutText ["Cannot Abort while in combat!", "PLAIN DOWN"];
cutText [localize "str_abort_playerincombat", "PLAIN DOWN"]; cutText [localize "str_abort_playerincombat", "PLAIN DOWN"];
}; };
case (_timeOut < _timeMax) : {
_btnAbort ctrlEnable false;
cutText [format ["Can Abort in %1", (_timeMax - _timeOut)], "PLAIN DOWN"];
};
default { default {
_btnAbort ctrlEnable true; _btnAbort ctrlEnable true;
cutText ["", "PLAIN DOWN"]; cutText ["", "PLAIN DOWN"];