Cloud22

Accurate Restart Time Calculator

27 posts in this topic

As promised I'm releasing something i made a couple of weeks back that I found more effective then the "dll required" restart timers. Now, I won't be giving you a restart timer but I will show you how the code can be applied. Oh, and this requires extDB3 but can be modified for extDB2 I suppose or you might be able to use the original that comes with ExiLe.

Override "ExileServer_system_database_connect.sqf" and find

ExileServerStartTime = (parseSimpleArray ("extDB3" callExtension "9:LOCAL_TIME")) select 1;

then after this line add

publicVariable "ExileServerStartTime";

Save the file.

Now go to where your restart timer is configured. Add this somewhere before where it checks the hour-startHour or whatever.

_aOn = [0,3,6,9,12,15,18,21,24]; // Military Time
startHour = ExileServerStartTime select 3;
startMinute = ExileServerStartTime select 4;
startSecond = ExileServerStartTime select 5;
correcto = [];
{
	if(startHour < _x and startHour != 24) then
	{
		correcto pushBack _x;
	};
} forEach _aOn;

Now the correct amount of hours can be determined by

((correcto select 0) - startHour)

and wala! You have a fully working exact restart timer.

SO how the hell do you actually use this? Heres an ExAD example config that utilizes this.

And heres someone elses statusbar utilizing this.

https://github.com/Cloudhax23/Exile/blob/master/SomeStatusBar/fn_Statusbar.sqf#L10-L31

https://github.com/Cloudhax23/Exile/blob/master/SomeStatusBar/fn_Statusbar.sqf#L87

Edited by Cloud22
  • Like 5

Share this post


Link to post
Share on other sites
Advertisement

You guys must have messed up. Make sure you have extdb3 and you follow it through exactly. I've been running this for a few months and have had no issues.

  • Like 1

Share this post


Link to post
Share on other sites

Hey thanks for this Cloud, If im using Infistar to manually shut down server a specific times, where could I put this ?

Edited by xDaVIRUS

Share this post


Link to post
Share on other sites
4 hours ago, tchao57 said:

Ok i'm dumb...

It works with extdb2. I forgot to add line


publicVariable "ExileServerStartTime";

 

Thx a lot guys !

It should not work in extDB2 for sure unless you modified the way it collects the local time...

 

11 hours ago, xDaVIRUS said:

Hey thanks for this Cloud, If im using Infistar to manually shut down server a specific times, where could I put this ?

This is more for your status bar. If your server restarts are static then you define the times and reference it in your script for status bar.

  • Like 1

Share this post


Link to post
Share on other sites
Advertisement

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

  • Recently Browsing   0 members

    No registered users viewing this page.