Jump to content
  • 0

want to make a message that appears in the chat every hour saying how long it is till the next server restart ( server restarts every 4 hours )


Exoflame

Question

7 answers to this question

Recommended Posts

  • 0
Just now, Exoflame said:

could anyone help me out, i'm pretty new to the dayz server files and don't know where to place things yet, and which functions do what..

you can use BEC as salival said (the scheduler.xml)  you can find an example of scheduler.xml with this msgs here:

 

or use config.cfg ( located in Your server Root\instance_11_chernarus\ )

change this lines

motd[] = {"DayZ Epoch","Have fun!"};
motdInterval = 0;

by:

motd[] = {
"restart every 4hs",
"server restart in 3hs",
"server restart in 2hs",
"server restart in 1hs"
};
motdInterval = 3600; //time in seconds between each msg

 

or this one by cherdenko

 

or u can use waituntil command and launch the msgs using hint or systemchat or dynamic or whatever..

something like:

waituntil {(round(time)) > 3600};
 if (time > 3600) then {hint "<SERVER-RESTART>:3hs";};
 
waituntil {(round(time)) > 7200};
 if (time > 7200) then {hint "<SERVER-RESTART>:2hs";};

waituntil {(round(time)) > 10800};
if (time > 10800) then {hint "<SERVER-RESTART>:1hs";};
 
waituntil {(round(time)) > 13800};
if (time > 13800) then {hint "<SERVER-RESTART>:10 minutes";}; 

 

Link to comment
Share on other sites

  • 0
10 hours ago, juandayz said:

 

something like:


waituntil {(round(time)) > 3600};
 if (time > 3600) then {hint "<SERVER-RESTART>:3hs";};
 
waituntil {(round(time)) > 7200};
 if (time > 7200) then {hint "<SERVER-RESTART>:2hs";};

waituntil {(round(time)) > 10800};
if (time > 10800) then {hint "<SERVER-RESTART>:1hs";};
 
waituntil {(round(time)) > 13800};
if (time > 13800) then {hint "<SERVER-RESTART>:10 minutes";}; 

 

this is enormously useful already, but this isnt proof against manual server restarts, i have made a scheduler on mygame panel that restarts the .exe file, so when i restart my server manually, it doesnt reset the timer for the auto-restart..

Link to comment
Share on other sites

  • 0
52 minutes ago, Exoflame said:

this is enormously useful already, but this isnt proof against manual server restarts, i have made a scheduler on mygame panel that restarts the .exe file, so when i restart my server manually, it doesnt reset the timer for the auto-restart..

Manual restart will always break the ingame timer. Infistars debug menu is the same.

Link to comment
Share on other sites

  • 0
Quote

this is enormously useful already, but this isnt proof against manual server restarts, i have made a scheduler on mygame panel that restarts the .exe file, so when i restart my server manually, it doesnt reset the timer for the auto-restart..

oh yes if u restart manually your server into the 4hs hours of server up time.. then yes.. your debug monitor timer gonna drop another diferent time..

To understand.  You set a server restart time in your scheduler.xml  (every 3hs for example) 00:00hs 03:00hs 06:00hs. etc

Then for example you start at 00:00hs.  and at 01:00hs you restart manually your server.  When you start again your server ,the debug monitor gonna show" time left 3hs".. and the autorestart msgs gonna show "server restart in 2hs".. and at 03:00hs your server gonna be restarted automatically while your debug monitor shows "time left 1hs".

So the problem its not the msgs.. is the manually autorestart in the middle and the debug monitor time.

Link to comment
Share on other sites

  • 0

I had mine set up for 2 hour restarts, but the timer on both the scheduler and the debug started when the server did, so it didn't matter if I manually restarted an hour into the scheduled 2 hours. As soon as the server restarted, the clocks were reset back to two hours. 

If you have it so your bec closes and launches alongside your server, it will always be in sync as long as you don't specify an actual time in the shceduler, but have it as a period of time. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...