[ANY] Shutdown Countdown
[ANY] Shutdown Countdown v1.6.2 Description: Allows any admin with the ADMFLAG_RCON flag (m) to start a timer till the server will automatically shut down. The command can be overridden, and the individual commands can even be overridden differently so only RCON admins can start countdowns but CVAR admins can cancel them, or something like that. The server is shut down by the plugin simply executing "quit" in the server console when the timer expires. When the timer is started, the hint box displays "WARNING: The server will shut down in x seconds." The message is customizable via cvar. When the timer falls below a certain value (customizable by a cvar, defaults to 30), the warning will also be displayed in the center of the screen, and also printed to the server console. Commands: sm_shutdown [time] - set a shutdown timer sm_shutdown_confirm - confirms a timer set with sm_shutdown and begins the countdown sm_shutdown_cancel - cancels the timer Cvars: sm_shutdown_countdown_version - plugin version sm_shutdown_countdown_notify - once the timer gets below this number of seconds, it will display the countdown in both csay and hsay. Defaults to 30 sm_shutdown_countdown_tag - allows you to change the tag displayed in command replies (defaults to "[SM]") sm_shutdown_countdown_beginning - the first part of the warning (defaults to "WARNING: The server will shut down in") sm_shutdown_countdown_end - the second part of the warning (defaults to "seconds.") sm_shutdown_countdown_auto_update - enables automatic updating (has no effect if Updater is not installed) (defaults to 1) The warning message will be displayed in the format: [sm_shutdown_countdown_beginning] [time remaining] [sm_shutdown_countdown_end] Installation: Put shutdowncountdown.smx into /addons/sourcemod/plugins and reboot your server or type "sm plugins load shutdowncountdown" into your console or rcon. Auto Update: Install Updater. The plugin will be autoupdated according to your Updater settings. It'll work without Updater. Changelog:
Download Plugin (shutdowncountdown.smx) View Source (shutdowncountdown.sp) |
Re: [ANY] Shutdown Countdown
Nice plugin!
In Command_ConfirmShutdown, you create a Timer every time the command is run. If it's run twice, the countdown cannot be canceled. Remember you can use %N to get the client's name if you use it as a variable. ie PHP Code:
PM me when the timer issue is fixed. |
Re: [ANY] Shutdown Countdown
The plugin has been updated to 1.1 with the fixes recommended above.
|
Re: [ANY] Shutdown Countdown
Updated. The version cvar now has an "A" appended to it if autoupdate is functioning.
|
Re: [ANY] Shutdown Countdown
I'd like to request the ability to change the tag from "[SM]" to my own tag without editing the plugin because then the autoupdater would revert it back to it's original "[SM]" tag. If you could make a translations or a CVAR with a config, it would be nice.
Edit: Just noticed you're using the old updater plugin, you should use this one. http://forums.alliedmods.net/showthread.php?p=1570806 |
Re: [ANY] Shutdown Countdown
Alright, I'll add a cvar to change tag. If I used a translations file, I might add new translations and then the updater would have to overwrite them. :)
Just let me figure out how to make the new updater work... Someone ought to unapprove the old one so others don't end up using it. |
Re: [ANY] Shutdown Countdown
Thanks, appreciate it.
|
Re: [ANY] Shutdown Countdown
Updated. The plugin now uses the newer, better-supported Updater plugin, added a cvar to change the tag, and the countdown will be printed to the server console when it's below sm_shutdown_countdown_notify.
|
Re: [ANY] Shutdown Countdown
Updated to 1.4.0. Fixed an issue where the plugin wouldn't be added to the Updater pool. If you are running Updater and you want to automatically update, simply execute "sm plugins reload shutdowncountdown" followed by "sm_shutdown_forceupdate" in the console/rcon.
|
Re: [ANY] Shutdown Countdown
Lots of updates to everything lately. :)
Updated to 1.5.0. The warning message is now customizable via cvar. See OP for more details. |
All times are GMT -4. The time now is 03:38. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.