Ulysses
Ulysses Stuff => Releases => Topic started by: Caustic Soda-Senpai on January 18, 2015, 11:44:00 PM
-
This was mostly just done for my server in the event that we needed a restart for some reason but I'm making it public cause I'm awesome.
Once you set the timer, it counts down from your set amount to 0 in minutes. It rounds to the nearest whole number, so no 2.5 minutes, etc.. It will also display each minute how many minutes you have remaining all the way to 0, where it gives you a final 3 seconds before it restarts the server. At any time during the countdown, you can abort it by typing !restartabort in chat. If you abort, it will show you how many minutes you had remaining before the shutdown.
Contains the following:
!restart - Sets the time for a server restart in minutes. (!restart <time>)
!restartabort - Aborts the current restart and displays the time remaining.
!restartpause - Pauses a Server Restart Timer.
!restartresume - Resumes a Server Restart Timer.
Let me know if there are any issues.
UPDATE:
Fixed the !restart 0 issue where the server would not run the restart.
Possible Updates:
More exact time remaining.
Partial Minutes - 30 seconds, 45 seconds, etc..
Graphical Interface displaying time left.
Suggestions/Requests?
-
You can pause and unpause a timer to make your resume function:
http://wiki.garrysmod.com/page/timer/Pause (http://wiki.garrysmod.com/page/timer/Pause)
http://wiki.garrysmod.com/page/timer/UnPause (http://wiki.garrysmod.com/page/timer/UnPause)
-
Completely overlooked the pause function, thanks Mr.P
-
Update: Added Pause/Resume and some configuration options.
-
Nice work. Simple yet effective, and could actually be used as template for other ideas/learning.
Glad you found some of my ramblings useful.
-
If you set a time and it did restart, do i have to set up the time again?
-
at this time, yes. I will write an auto restart command that you can set to restart after (x) minutes after the server is launched
-
Yeah, i want it to make a restart 1x per day, but it's not working after map change :p
-
If you have a server that changes maps, then it won't be able to run every 86400 seconds (1 day) because it runs with the server. If the server changes maps, it kills the restart timer.
-
If you have a server that changes maps, then it won't be able to run every 86400 seconds (1 day) because it runs with the server. If the server changes maps, it kills the restart timer.
Store the time in a data file. Or even a database.
-
I didnt think of that, that could work.
-
Does this still work or did the update break it?
-
Does this still work or did the update break it?
Everything works fine for me!
-
Everything works fine for me!
Doesn't work for me, when i click restart it says the server has been set to restart but then it doesn't do anything
-
Ohh yes this error! (not a console error) Just do !restart 1 its alot easier!
-
I am aware of the issue but haven't had the time to update it. I will let you know when I do.
-
I am aware of the issue but haven't had the time to update it. I will let you know when I do.
Sorry, i meant to say it works its just when you type !restart 0 it doesn't immediately restart it unless that's intentional?
If you do !restart 5 it works
-
Ran a restart with 1 minute via xgui and it worked great. Love the countdown timer.
!restart 0 says it's going to restart but never does. !restart 1 says it will restart in a minute. I ran it already via xgui so I'm sure the 1 minute works, but the 0 doesn't insta-restart.
-
I'm aware of the !restart 0 issue. As I have replied in previous posts, I'll update as soon as I have time to do it.
EDIT: I have now updated the script to run the !restart 0 function.
-
I'm aware of the !restart 0 issue. As I have replied in previous posts, I'll update as soon as I have time to do it.
EDIT: I have now updated the script to run the !restart 0 function.
Don't see where you responded to this issue directly, but glad you got it working. I will test soon.
EDIT: !restart 0 confirmed works. Thanks!
-
Where do I find a Download?
-
At the bottom of the original first post.