IT07 Posted March 15, 2015 Report Share Posted March 15, 2015 S.R.W. (Server Restart Warnings)by IT07 FEATURES- Linux & Windows server compatible - Runs client-side through missionfile - Very easy configuration: just change a few numbers- Support for Scheduled restart patterns - Configurable restart interval - You decide when warnings will be shown INFO This light-weight script will automatically warn players when a restart is closing in. It uses BIS_fnc_typeText. It is fully customizable in terms of when the restart warnings are given and the schedule or interval. Just make sure that you put in the right configuration to match your server :) In case your were wondering: yes it does work with players that join after 1 or more warnings for a restart have been given. IMPORTANT If you own a version before version 02039_PATCH1 then you HAVE to upgrade. It fixes a big security leak in the script. RECOMMENDED - Notepadd++ for editing the files http://notepad-plus-plus.org/VIDEOhttps://youtu.be/sBg3Co4LGL8NOTES This script DOES NOT restart your server. It only gives warnings depending on how you configured it to do so.ISSUES - bugged restarts warning times when using scheduled _restartMode. More details about that: the command missionStart when ran on the server should return [year,month,day,hour,minute,second] of when the server was started. But it does not do that. Instead, it returns some weird date back in 1970. This prevents the script from being able to check when the server was started. Which renders the whole idea of the script useless. This issue has been submitted to the ArmA 3 feedback tracker: http://feedback.arma3.com/view.php?id=23373 please upvote this post and ask anyone that wants to help to do the same. It will allow implementation of working support for scheduled restarts into this script. news 30th March 2015: The issue has been confirmed by ArmA 3 Devs! DOWNLOAD & INSTALLATION https://github.com/IT07/A3_ScarCode_ScriptBundle unrealPANDA, Patriarch, psychosis and 6 others 9 Link to comment Share on other sites More sharing options...
teamcrisiz Posted March 16, 2015 Report Share Posted March 16, 2015 I have it on it works well. would make more of it graphically. IT07 1 Link to comment Share on other sites More sharing options...
IT07 Posted March 16, 2015 Author Report Share Posted March 16, 2015 I have it on it works well. would make more of it graphically. Thank you. Can you be a bit more specific about what you mean with "more of it graphically"? Link to comment Share on other sites More sharing options...
HackSaW_TM Posted March 16, 2015 Report Share Posted March 16, 2015 ] 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 ////////////////////////////////////////////////////////////////////////// Is this correct? my server restart is every 4 hours please check my above init file IT07 1 Link to comment Share on other sites More sharing options...
IT07 Posted March 16, 2015 Author Report Share Posted March 16, 2015 Is this correct? my server restart is every 4 hours please check my above init file Yes that looks just about right. I hope you enjoy the script :) Link to comment Share on other sites More sharing options...
HackSaW_TM Posted March 16, 2015 Report Share Posted March 16, 2015 Yes that looks just about right. I hope you enjoy the script :) I tried li,e this way but my SEM mission wont start... :( any reason why? if i create a different if(hasInterface)then..... just for your script sem wont stsrt.. Please advise. IT07 1 Link to comment Share on other sites More sharing options...
Achmed Posted March 16, 2015 Report Share Posted March 16, 2015 your missing a ; after execVM "semClient.sqf" Scaris and IT07 2 Link to comment Share on other sites More sharing options...
fullaholes Posted March 16, 2015 Report Share Posted March 16, 2015 I haven't tried it yet as my server hasn't restarted, but this is fantastic IT07... Many thanks for this ;) IT07 1 Link to comment Share on other sites More sharing options...
IT07 Posted March 16, 2015 Author Report Share Posted March 16, 2015 I tried li,e this way but my SEM mission wont start... :( any reason why? if i create a different if(hasInterface)then..... just for your script sem wont stsrt.. Please advise. Sorry I only looked at how you put in my script. If you want me to check your code for errors then you're gonna have to PM me instead ;) I haven't tried it yet as my server hasn't restarted, but this is fantastic IT07... Many thanks for this ;) You are very welcome! I hope you and your players are going to appreciate it forever :) Link to comment Share on other sites More sharing options...
rhughes945 Posted March 16, 2015 Report Share Posted March 16, 2015 You sir are a legend. All of your work has always been pretty much useful and spot on. My server is loving this. IT07 1 Link to comment Share on other sites More sharing options...
Metalfoundry Posted March 17, 2015 Report Share Posted March 17, 2015 link is dead? can´t download it.. Link to comment Share on other sites More sharing options...
arafinar Posted March 17, 2015 Report Share Posted March 17, 2015 works great for me, since A2 havent been able to get scheduler.xml to work :) IT07 1 Link to comment Share on other sites More sharing options...
IT07 Posted March 17, 2015 Author Report Share Posted March 17, 2015 link is dead? can´t download it.. I seriously don't get it why people think it's dead... because it's not. It works fine. Maybe I'll move the code to gitHub at some point. Link to comment Share on other sites More sharing options...
IT07 Posted March 17, 2015 Author Report Share Posted March 17, 2015 You sir are a legend. All of your work has always been pretty much useful and spot on. My server is loving this. Thank you very much I appreciate your kindness. rhughes945 1 Link to comment Share on other sites More sharing options...
R4ziel Posted March 17, 2015 Report Share Posted March 17, 2015 I really like this and will play with it, i just have a question though, is there any way to link this to system time? Say for instance the server crashes at 4PM and the next restart is at 6PM, the restart warning would be out of whack completely correct? If we could link that to pre-defined times that would be the most legend server restart warning around!! IT07 1 Link to comment Share on other sites More sharing options...
IT07 Posted March 17, 2015 Author Report Share Posted March 17, 2015 I really like this and will play with it, i just have a question though, is there any way to link this to system time? Say for instance the server crashes at 4PM and the next restart is at 6PM, the restart warning would be out of whack completely correct? If we could link that to pre-defined times that would be the most legend server restart warning around!! No matter what happens, the restart warnings will always work correctly. It works like this: when the server starts, it will start counting in milliseconds how long the mission has been running. My script will then execute on the player's computer and will check what the elapsed time is in miliseconds. Depending on what the time is, it will do certain things to make sure that the player will get the correct warnings. In short: do not worry about server crashes, this script will still properly work. Link to comment Share on other sites More sharing options...
rhughes945 Posted March 17, 2015 Report Share Posted March 17, 2015 So those of us that have restart schedules set by time, it will still work even if the server was manually restarted halfway through a cycle? So say my restart is at 6pm, next one would be at 12 but the server crashed/manually restarted at 3, surely this system wouldn't know there is a restart until 6 hours later, not 3? Link to comment Share on other sites More sharing options...
teamcrisiz Posted March 17, 2015 Report Share Posted March 17, 2015 Thank you. Can you be a bit more specific about what you mean with "more of it graphically"? better and more creative, perhaps with a different sound. maybe i can found some nice layouts, let me try ;) Link to comment Share on other sites More sharing options...
R4ziel Posted March 17, 2015 Report Share Posted March 17, 2015 So those of us that have restart schedules set by time, it will still work even if the server was manually restarted halfway through a cycle? So say my restart is at 6pm, next one would be at 12 but the server crashed/manually restarted at 3, surely this system wouldn't know there is a restart until 6 hours later, not 3? This is what I also want to make sure of. I understand that the script counts time in game and gives the warning to players at the same time, but I want to know if I restart the server half an hour before the actual scheduled restart, will the server warn the players 10 minutes later that the server will restart in 20 minutes because that is the scheduled restart time? Is there a way we can let them know the restart times as well with this method, just spamming messages like BEC that the server restarts at certain time intervals IT07 1 Link to comment Share on other sites More sharing options...
IT07 Posted March 17, 2015 Author Report Share Posted March 17, 2015 Ok hold on I get it. I will look into this for sure. If I succeed, I will reupload that version and include an option to enable it. EDIT: Found something useful: https://community.bistudio.com/wiki/serverTime I will check it out when I get back from work. rhughes945 1 Link to comment Share on other sites More sharing options...
IT07 Posted March 17, 2015 Author Report Share Posted March 17, 2015 better and more creative, perhaps with a different sound. maybe i can found some nice layouts, let me try ;) I will take your positive critisism into account for future releases. Thank you Link to comment Share on other sites More sharing options...
R4ziel Posted March 17, 2015 Report Share Posted March 17, 2015 Awesome thanks for looking into our suggestion, if you get that waxed to keep time with the server so that I can keep my 6 hour restart schedule as well as irregular restarts without worrying about the warning going all haywire, then your work will certainly be legendary and I can live without BEC. You sir are a legend and a scholar! Your work is definitely commendable! IT07 and rhughes945 2 Link to comment Share on other sites More sharing options...
IT07 Posted March 17, 2015 Author Report Share Posted March 17, 2015 Awesome thanks for looking into our suggestion, if you get that waxed to keep time with the server so that I can keep my 6 hour restart schedule as well as irregular restarts without worrying about the warning going all haywire, then your work will certainly be legendary and I can live without BEC. You sir are a legend and a scholar! Your work is definitely commendable! I'm glad you like it. Thank you for your appreciation. Link to comment Share on other sites More sharing options...
rhughes945 Posted March 17, 2015 Report Share Posted March 17, 2015 Ok hold on I get it. I will look into this for sure. If I succeed, I will reupload that version and include an option to enable it. EDIT: Found something useful: https://community.bistudio.com/wiki/serverTime I will check it out when I get back from work. Another reason you're awesome. Pretty damn awesome script just as it is. IT07 1 Link to comment Share on other sites More sharing options...
IT07 Posted March 17, 2015 Author Report Share Posted March 17, 2015 Another reason you're awesome. Pretty damn awesome script just as it is. After I clicked the "Like this" button on your reply, it said: "You have reached the mamixum positive ratings for today".... 1st world problems haha rhughes945 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now