mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
Update compiles - 2 more files to do
fn_selfActions.sqf player_updateGui.sqf
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
private ["_display","_btnRespawn","_btnAbort","_timeOut","_timeMax","_btnAbortText"];
|
||||
private ["_display","_timeout","_inCombat","_playerCheck","_zedCheck"];
|
||||
disableSerialization;
|
||||
waitUntil {
|
||||
_display = findDisplay 49;
|
||||
@@ -11,36 +11,41 @@ _btnAbort ctrlEnable false;
|
||||
_btnAbortText = ctrlText _btnAbort;
|
||||
_timeOut = 0;
|
||||
_timeMax = diag_tickTime+10;
|
||||
dayz_lastCheckBit = time;
|
||||
|
||||
// if(r_player_dead) exitWith {_btnAbort ctrlEnable true;};
|
||||
|
||||
if(r_fracture_legs && !r_player_dead) then {_btnRespawn ctrlEnable true;};
|
||||
|
||||
|
||||
dayz_lastCheckSave = time;
|
||||
//force gear save
|
||||
if (!r_player_dead && time - dayz_lastCheckBit > 10) then {
|
||||
call dayz_forceSave;
|
||||
};
|
||||
if (time - dayz_lastCheckSave > 10) then {
|
||||
call player_forceSave;
|
||||
};
|
||||
|
||||
if (r_player_dead || (!alive player)) exitWith {_btnAbort ctrlEnable true; _btnAbort ctrlSetText _btnAbortText;};
|
||||
_sleep = 1;
|
||||
while {(!isNull _display) and !r_player_dead} do {
|
||||
_timeout = 30;
|
||||
_timeout = player getVariable["combattimeout", 0];
|
||||
_inCombat = if (_timeout >= diag_tickTime) then { true } else { false };
|
||||
_playerCheck = if ({isPlayer _x} count (player nearEntities ["AllVehicles", 5]) > 1) then { true } else { false };
|
||||
//_zedCheck = if (count (player nearEntities ["zZombie_Base", 10]) > 0) then { true } else { false };
|
||||
|
||||
while {!isNull _display} do {
|
||||
switch true do {
|
||||
case (!r_player_dead && {isPlayer _x} count (player nearEntities ["AllVehicles", 12]) > 1) : {
|
||||
Switch true do {
|
||||
case (_playerCheck) : {
|
||||
_btnAbort ctrlEnable false;
|
||||
_btnAbort ctrlSetText format["%1 (in 30)", _btnAbortText];
|
||||
cutText [localize "str_abort_playerclose", "PLAIN DOWN"];
|
||||
_sleep = 1;
|
||||
};
|
||||
case (!r_player_dead && isInTraderCity) : {
|
||||
case (isInTraderCity) : {
|
||||
_btnAbort ctrlEnable false;
|
||||
cutText [(localize "str_epoch_player_12"), "PLAIN DOWN"];
|
||||
_sleep = 1;
|
||||
};
|
||||
case (!r_player_dead && player getVariable["combattimeout", 0] >= time) : {
|
||||
/*case (_zedCheck) : {
|
||||
_btnAbort ctrlEnable false;
|
||||
//cutText ["Cannot Abort while in combat!", "PLAIN DOWN"];
|
||||
cutText [localize "str_abort_playerincombat", "PLAIN DOWN"];
|
||||
_sleep = 1;
|
||||
_btnAbort ctrlSetText format["%1 (in 10)", _btnAbortText];
|
||||
cutText [localize "str_abort_zedsclose", "PLAIN DOWN"];
|
||||
};*/
|
||||
case (_inCombat and !_playerCheck) : {
|
||||
_btnAbort ctrlEnable false;
|
||||
_btnAbort ctrlSetText format["%1 (in %2)", _btnAbortText, ceil (_timeout - diag_tickTime)];
|
||||
};
|
||||
case (_timeOut < _timeMax) : {
|
||||
_btnAbort ctrlEnable false;
|
||||
@@ -51,11 +56,10 @@ while {!isNull _display} do {
|
||||
default {
|
||||
_btnAbort ctrlEnable true;
|
||||
_btnAbort ctrlSetText _btnAbortText;
|
||||
cutText ["", "PLAIN DOWN"];
|
||||
_sleep = 1;
|
||||
};
|
||||
};
|
||||
uiSleep _sleep;
|
||||
_timeOut = diag_tickTime;
|
||||
uiSleep 1;
|
||||
};
|
||||
cutText ["", "PLAIN DOWN"];
|
||||
|
||||
if (r_player_dead) exitWith {_btnAbort ctrlEnable true;};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user