From 9fe0395138606657f6587d8487144b2657128e79 Mon Sep 17 00:00:00 2001 From: "[VB]AWOL" Date: Wed, 18 Sep 2013 03:43:29 -0500 Subject: [PATCH] abort will now have a 10 second timer. --- SQF/dayz_code/compile/player_onPause.sqf | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/SQF/dayz_code/compile/player_onPause.sqf b/SQF/dayz_code/compile/player_onPause.sqf index e7720cecb..5dec7fafe 100644 --- a/SQF/dayz_code/compile/player_onPause.sqf +++ b/SQF/dayz_code/compile/player_onPause.sqf @@ -9,37 +9,36 @@ private ["_display","_btnRespawn","_btnAbort","_timeOut","_timeMax"]; _btnRespawn ctrlEnable false; _btnAbort ctrlEnable false; _timeOut = 0; - _timeMax = 30; + _timeMax = 10; 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;}; //force gear save - if (time - dayz_lastCheckBit > 10) then { + if (!r_player_dead and time - dayz_lastCheckBit > 10) then { call dayz_forceSave; }; while {!isNull _display} 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; cutText [localize "str_abort_playerclose", "PLAIN DOWN"]; }; - case (_timeOut < _timeMax && count (player nearEntities ["zZombie_Base", 35]) > 0) : { - _btnAbort ctrlEnable false; - cutText [format ["Can Abort in %1", (_timeMax - _timeOut)], "PLAIN DOWN"]; - //cutText [format[localize "str_abort_zedsclose",_text, "PLAIN DOWN"]; - }; - case (!canbuild) : { + case (!r_player_dead and !canbuild) : { _btnAbort ctrlEnable false; 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; //cutText ["Cannot Abort while in combat!", "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 { _btnAbort ctrlEnable true; cutText ["", "PLAIN DOWN"];