Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private["_display","_btnRespawn","_btnAbort","_timeOut","_timeMax","_isDead","_timeOutDead","_timeMaxDead"];
- disableSerialization;
- waitUntil {
- _display = findDisplay 49;
- !isNull _display;
- };
- _btnRespawn = _display displayCtrl 1010;
- _btnAbort = _display displayCtrl 104;
- _btnRespawn ctrlEnable false;
- _btnAbort ctrlEnable false;
- _timeOut = 0;
- _timeOutDead = 0;
- _timeMax = 20;
- _timeMaxDead = 4;
- dayz_lastCheckBit = time;
- //if(r_player_dead) exitWith {_btnAbort ctrlEnable true;};
- //if(r_player_dead && _timeOutDead >= _timeMaxDead) exitWith {_btnAbort ctrlEnable true;};
- if(r_fracture_legs) then {_btnRespawn ctrlEnable true;};
- //force gear save
- if (time - dayz_lastCheckBit > 10) then {
- call dayz_forceSave;
- };
- while {!isNull _display} do {
- switch true do {
- case (r_player_dead) : {
- if(_timeOutDead < _timeMaxDead) then {
- _btnAbort ctrlEnable false;
- cutText [format ["Can Abort in %1", (_timeMaxDead - _timeOutDead)], "PLAIN DOWN"];
- cutText ["You Must Wait 4 seconds to abort!", "PLAIN DOWN"];
- _timeOutDead = _timeOutDead + 1;
- } else {
- _btnAbort ctrlEnable true;
- };
- };
- case ({isPlayer _x} count (player nearEntities ["AllVehicles", 6]) > 1) : {
- _btnAbort ctrlEnable false;
- cutText [format[localize "str_abort_playerclose",_text], "PLAIN DOWN"];
- };
- case (_timeOut < _timeMax && count (player nearEntities ["zZombie_Base", 15]) > 0) : {
- _btnAbort ctrlEnable false;
- cutText [format ["Can Abort in %1", (_timeMax - _timeOut)], "PLAIN DOWN"];
- //cutText [format[localize "str_abort_zedsclose",_text, "PLAIN DOWN"];
- };
- case (player getVariable["combattimeout", 18] >= time) : {
- _btnAbort ctrlEnable false;
- cutText [format ["Can Abort in %1", (_timeMax - _timeOut)], "PLAIN DOWN"];
- };
- default {
- _btnAbort ctrlEnable true;
- cutText ["You can now logout", "PLAIN DOWN"];
- };
- };
- sleep 1;
- _timeOut = _timeOut + 1;
- };
- cutText ["", "PLAIN DOWN"];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement