Jump to content

[scarCODE] S.R.W. (Server Restart Warnings) by IT07


IT07

Recommended Posts

Hello Guys even tho i got the script working and i have changed my restart time as it is scheduled to 4 hrs  but server warnings was given based on 3 hrs . 

any reason why?

 

please see my init file thanks a lot ... 

 

Hardened you are awesome mate :D

 

 

[] execVM "IgiLoad\IgiLoadInit.sqf";
 
[] execVM "wai\remote.sqf";
 
//Supply Drop Alert Event
"SDROP_Alert" addPublicVariableEventHandler {
hint parseText format["%1", _this select 1];
};
 
if (isServer) then 
{
fn_getBuildingstospawnLoot = compile preProcessFileLineNumbers "Custom\LSpawner\fn_LSgetBuildingstospawnLoot.sqf"; 
LSdeleter = compile preProcessFileLineNumbers "Custom\LSpawner\LSdeleter.sqf";
execVM "Custom\LSpawner\Lootspawner.sqf";
};
 
// Status Bar
[] execVM "scripts\fn_statusBar.sqf";
// Welcome Credits
[] execVM "custom\welcome.sqf";
 
if(hasInterface)then{execVM "semClient.sqf";
 
// Time until next restart by IT07
private["_SC_restartIntvlHours"];
/////// CONFIG /////// 
// Please edit the 3 lines below to your likings
_SC_restartIntvlHours = 4; // Change the number 1 into the number of hours your server will be up before it restarts
_SC_restartWarnTopMessage = "== WARNING =="; // What the first line of the warning should say
_SC_restartTimeHintSilent = false;  // RECOMMENDED: false; If true, it will mess with debug monitor!
////////////////////// DO NOT CHANGE ANYTHING BELOW THIS LINE
[_SC_restartIntvlHours, _SC_restartWarnTopMessage, _SC_restartTimeHintSilent] ExecVM "ScarCode\SC_restartTime.sqf";
};
 
//cmEARPLUGS CODE START
//////////////////////////////////////////////////////////////////////////
call compile preProcessFileLineNumbers "cmEarplugs\cm_veh_fun.sqf";
//cmEARPLUGS CODE END
//////////////////////////////////////////////////////////////////////////
 

[spoiler/]

Link to comment
Share on other sites

If you do not add -autoinit to the launch parameters of the server, then the mission will start only when the first player joins. Which will mean that the server was already running for a longer period of time. Sorry I should have mentioned it.

Link to comment
Share on other sites

 

If you do not add -autoinit to the launch parameters of the server, then the mission will start only when the first player joins. Which will mean that the server was already running for a longer period of time. Sorry I should have mentioned it.

Strange coz i belive i have added... 

 

-autoInit -mod=@Epoch;@EpochHive;@mas;@AllInArmaTerrainPack -name=A3E_Server -profiles=A3E_Server -config=A3E_Server\server.cfg -cfg=A3E_Server\basic.cfg -ip=217.23.11.160 -port=2302

Link to comment
Share on other sites

To make it clear: you have the interval set in the config to 4 hours, but the first warning is given at 2:30 instead of 3:30? If so, then there must be something you've looked over because it should (and it does) work fine on any other server. I have tested this too often to doubt that there isn't an error in my script.

Link to comment
Share on other sites

Strange coz i belive i have added... 

 

-autoInit -mod=@Epoch;@EpochHive;@mas;@AllInArmaTerrainPack -name=A3E_Server -profiles=A3E_Server -config=A3E_Server\server.cfg -cfg=A3E_Server\basic.cfg -ip=217.23.11.160 -port=2302

I put the autoinit at the end and it works right

Link to comment
Share on other sites

Does it matter where autoinit goes in the server parameters ?

 

mine looks like this...

 

start /wait C:\TCAFiles\Users\*******\7572\arma3server.exe -ip=69.197.31.179 -port=2300 -profiles=Arma3Config -name=Arma3Config -config=Arma3Config\config.cfg -cfg=Arma3Config\arma3.cfg -autoInit -loadMissionToMemory -mod=@allinarmaterrainpack;@Epoch;@EpochHive;

Link to comment
Share on other sites

Does it matter where autoinit goes in the server parameters ?

 

mine looks like this...

 

start /wait C:\TCAFiles\Users\*******\7572\arma3server.exe -ip=69.197.31.179 -port=2300 -profiles=Arma3Config -name=Arma3Config -config=Arma3Config\config.cfg -cfg=Arma3Config\arma3.cfg -autoInit -loadMissionToMemory -mod=@allinarmaterrainpack;@Epoch;@EpochHive;

 

That looks fine to me. Try it.

Link to comment
Share on other sites

Hello Guys even tho i got the script working and i have changed my restart time as it is scheduled to 4 hrs  but server warnings was given based on 3 hrs . 

any reason why?

 

please see my init file thanks a lot ... 

 

Hardened you are awesome mate :D

 

 

[] execVM "IgiLoad\IgiLoadInit.sqf";
 
[] execVM "wai\remote.sqf";
 
//Supply Drop Alert Event
"SDROP_Alert" addPublicVariableEventHandler {
hint parseText format["%1", _this select 1];
};
 
if (isServer) then 
{
fn_getBuildingstospawnLoot = compile preProcessFileLineNumbers "Custom\LSpawner\fn_LSgetBuildingstospawnLoot.sqf"; 
LSdeleter = compile preProcessFileLineNumbers "Custom\LSpawner\LSdeleter.sqf";
execVM "Custom\LSpawner\Lootspawner.sqf";
};
 
// Status Bar
[] execVM "scripts\fn_statusBar.sqf";
// Welcome Credits
[] execVM "custom\welcome.sqf";
 
if(hasInterface)then{execVM "semClient.sqf";
 
// Time until next restart by IT07
private["_SC_restartIntvlHours"];
/////// CONFIG /////// 
// Please edit the 3 lines below to your likings
_SC_restartIntvlHours = 4; // Change the number 1 into the number of hours your server will be up before it restarts
_SC_restartWarnTopMessage = "== WARNING =="; // What the first line of the warning should say
_SC_restartTimeHintSilent = false;  // RECOMMENDED: false; If true, it will mess with debug monitor!
////////////////////// DO NOT CHANGE ANYTHING BELOW THIS LINE
[_SC_restartIntvlHours, _SC_restartWarnTopMessage, _SC_restartTimeHintSilent] ExecVM "ScarCode\SC_restartTime.sqf";
};
 
//cmEARPLUGS CODE START
//////////////////////////////////////////////////////////////////////////
call compile preProcessFileLineNumbers "cmEarplugs\cm_veh_fun.sqf";
//cmEARPLUGS CODE END
//////////////////////////////////////////////////////////////////////////
 

[spoiler/]

Found the solution :) I've just changed 5 instead of 4 in  <_SC_restartIntvlHours = 4;>  :D

Link to comment
Share on other sites

Development has been delayed a little bit due to restructuring of the code for safety and performance reasons.

The implementation of the schedule support is very demanding to run and should be scripted carefully to prevent CPU clogging.

 

Thank you for your patience.

Link to comment
Share on other sites

I don't release scripts that do not work. You must have configured the schedule the wrong way.

You say that you have 0,4,8,12,16,20. Does your schedule look like this:

_restartSchedule = [[0,00],[4,00],[8,00],[12,00],[16,00],[20,00]];

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
×
×
  • Create New...