Ulysses Stuff > Releases

Restart Timer Command

(1/5) > >>

Caustic Soda-Senpai:
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?

MrPresident:
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/UnPause

Caustic Soda-Senpai:
Completely overlooked the pause function, thanks Mr.P

Caustic Soda-Senpai:
Update: Added Pause/Resume and some configuration options.

JamminR:
Nice work. Simple yet effective, and could actually be used as template for other ideas/learning.
Glad you found some of my ramblings useful.

Navigation

[0] Message Index

[#] Next page

Go to full version