Advertisement
Guest User

Untitled

a guest
Jun 2nd, 2013
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.67 KB | None | 0 0
  1. private["_display","_btnRespawn","_btnAbort","_timeOut","_timeMax","_isDead","_timeOutDead","_timeMaxDead"];
  2. disableSerialization;
  3. waitUntil {
  4. _display = findDisplay 49;
  5. !isNull _display;
  6. };
  7. _btnRespawn = _display displayCtrl 1010;
  8. _btnAbort = _display displayCtrl 104;
  9. _btnRespawn ctrlEnable false;
  10. _btnAbort ctrlEnable false;
  11. _timeOut = 0;
  12. _timeOutDead = 0;
  13. _timeMax = 20;
  14. _timeMaxDead = 4;
  15. dayz_lastCheckBit = time;
  16.  
  17. //if(r_player_dead) exitWith {_btnAbort ctrlEnable true;};
  18. //if(r_player_dead && _timeOutDead >= _timeMaxDead) exitWith {_btnAbort ctrlEnable true;};
  19. if(r_fracture_legs) then {_btnRespawn ctrlEnable true;};
  20.  
  21. //force gear save
  22. if (time - dayz_lastCheckBit > 10) then {
  23. call dayz_forceSave;
  24. };
  25.  
  26. while {!isNull _display} do {
  27. switch true do {
  28. case (r_player_dead) : {
  29. if(_timeOutDead < _timeMaxDead) then {
  30. _btnAbort ctrlEnable false;
  31. cutText [format ["Can Abort in %1", (_timeMaxDead - _timeOutDead)], "PLAIN DOWN"];
  32. cutText ["You Must Wait 4 seconds to abort!", "PLAIN DOWN"];
  33. _timeOutDead = _timeOutDead + 1;
  34. } else {
  35. _btnAbort ctrlEnable true;
  36. };
  37. };
  38. case ({isPlayer _x} count (player nearEntities ["AllVehicles", 6]) > 1) : {
  39. _btnAbort ctrlEnable false;
  40. cutText [format[localize "str_abort_playerclose",_text], "PLAIN DOWN"];
  41. };
  42. case (_timeOut < _timeMax && count (player nearEntities ["zZombie_Base", 15]) > 0) : {
  43. _btnAbort ctrlEnable false;
  44. cutText [format ["Can Abort in %1", (_timeMax - _timeOut)], "PLAIN DOWN"];
  45. //cutText [format[localize "str_abort_zedsclose",_text, "PLAIN DOWN"];
  46. };
  47. case (player getVariable["combattimeout", 18] >= time) : {
  48. _btnAbort ctrlEnable false;
  49. cutText [format ["Can Abort in %1", (_timeMax - _timeOut)], "PLAIN DOWN"];
  50.  
  51. };
  52. default {
  53. _btnAbort ctrlEnable true;
  54. cutText ["You can now logout", "PLAIN DOWN"];
  55. };
  56. };
  57. sleep 1;
  58. _timeOut = _timeOut + 1;
  59. };
  60. cutText ["", "PLAIN DOWN"];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement