Timer with a delay for DayZ

dos

New Member
Hello all!
Could someone help me to make a pre-login delay. At the moment when player see "Setup completed please wait" message?
Delay should be 30 seconds.
 
At your init.sqf find the following
Code:
if (!isDedicated) then {
    waitUntil {!isNil "dayz_loadScreenMsg"};
    dayz_loadScreenMsg = (localize "STR_AUTHENTICATING");
    _id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}];
    _playerMonitor = [] execVM "\z\addons\dayz_code\system\player_monitor.sqf";
    if (dayz_antihack == 1) then {
    [] execVM "antihack.sqf";
    };
};
change to
Code:
if (!isDedicated) then {
    waitUntil {!isNil "dayz_loadScreenMsg"};
        _timeOut = 30;
        while { _timeOut > 0 } do {
            dayz_loadScreenMsg = format["Please wait %1 seconds before you can join",str(_timeOut)];
            _timeOut = _timeOut - 1;
            sleep 1;
        };
    dayz_loadScreenMsg = (localize "STR_AUTHENTICATING");
    _id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}];
    _playerMonitor = [] execVM "\z\addons\dayz_code\system\player_monitor.sqf";
    if (dayz_antihack == 1) then {
    [] execVM "antihack.sqf";
    };
};

_timeOut = 30; variable is your delay option:)
 
Back
Top