Inkko
Valued Member!
A bunch of my players have been complaining about logging out and not having any of their progress saved once they log back in. Is anyone else having this issue or is it just me? and how could I fix this issue?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
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 = 15;
_timeMaxDead = 5;
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"];
_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"];
call dayz_forceSave;
};
case (_timeOut < _timeMax && count (player nearEntities ["zZombie_Base", 35]) > 0) : {
_btnAbort ctrlEnable true;
//cutText [format ["Can Abort in %1", (_timeMax - _timeOut)], "PLAIN DOWN"];
//cutText [format[localize "str_abort_zedsclose",_text, "PLAIN DOWN"];
call dayz_forceSave;
};
case (player getVariable["combattimeout", 0] >= time) : {
_btnAbort ctrlEnable false;
//cutText ["Cannot Abort while in combat!", "PLAIN DOWN"];
cutText [format[localize "str_abort_playerincombat",_text], "PLAIN DOWN"];
call dayz_forceSave;
};
default {
_btnAbort ctrlEnable true;
cutText ["", "PLAIN DOWN"];
call dayz_forceSave;
};
};
sleep 1;
_timeOut = _timeOut + 1;
};
cutText ["", "PLAIN DOWN"];
This is what my on pause looks likei also had this problem on our server but i found away to fix it is by modifying the onpause.sqf in the mission file
relplace it with this
Code: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 = 15; _timeMaxDead = 5; 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"]; _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"]; call dayz_forceSave; }; case (_timeOut < _timeMax && count (player nearEntities ["zZombie_Base", 35]) > 0) : { _btnAbort ctrlEnable true; //cutText [format ["Can Abort in %1", (_timeMax - _timeOut)], "PLAIN DOWN"]; //cutText [format[localize "str_abort_zedsclose",_text, "PLAIN DOWN"]; call dayz_forceSave; }; case (player getVariable["combattimeout", 0] >= time) : { _btnAbort ctrlEnable false; //cutText ["Cannot Abort while in combat!", "PLAIN DOWN"]; cutText [format[localize "str_abort_playerincombat",_text], "PLAIN DOWN"]; call dayz_forceSave; }; default { _btnAbort ctrlEnable true; cutText ["", "PLAIN DOWN"]; call dayz_forceSave; }; }; sleep 1; _timeOut = _timeOut + 1; }; cutText ["", "PLAIN DOWN"];
what this will do is every time they hit the ESC key the players location,gear,state,etc will be force saved to the database.
private["_display","_btnRespawn","_btnAbort","_timeOut","_timeMax","_isDead"];
disableSerialization;
waitUntil {
_display = findDisplay 49;
!isNull _display;
};
_btnRespawn = _display displayCtrl 1010;
_btnAbort = _display displayCtrl 104;
_btnRespawn ctrlEnable false;
_btnAbort ctrlEnable false;
_timeOut = 0;
_timeMax = 30;
dayz_lastCheckBit = time;
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 {
call dayz_forceSave;
};
while {!isNull _display} do {
switch true do {
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", 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 (player getVariable["combattimeout", 0] >= time) : {
_btnAbort ctrlEnable false;
//cutText ["Cannot Abort while in combat!", "PLAIN DOWN"];
cutText [format[localize "str_abort_playerincombat",_text], "PLAIN DOWN"];
};
default {
_btnAbort ctrlEnable true;
cutText ["", "PLAIN DOWN"];
};
};
sleep 1;
_timeOut = _timeOut + 1;
};
cutText ["", "PLAIN DOWN"];
thats what i didSo adding a force save to each of the cases should help?