Raised This Month: $100 Target: $400
 25% 

Server Restart 1.1


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:          Approver:   EKS (167)
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 08-12-2005 , 01:10   Server Restart 1.1
Reply With Quote #1

Code:
//Server Shutdown by Remo Williams
//
// changelog
// 1.0 - First Release
// - Modified, added sounds to sequence.
// 1.1 - Second Release
// - Added server echoing
This is a simple but useful plugin. It allows you to use a command to restart your server. Assuming you are using a program to restart your server once it crashes, like serverdoc. This plugin will work.

This basically alerts everyone that the server is shutting down, then countsdown from 10 to 1, then restarts the server, and makes everyone auto reconnect to your server. I find this very useful in my case, because i have to debug my plugins i am currently making.

Commands:
amx_shutdown

By,
Remo Williams, aka Mysticssjgoku4, Ryan Wehrle
Attached Files
File Type: sma Get Plugin or Get Source (servershutdown.sma - 3977 views - 2.9 KB)
__________________

mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
CubicVirtuoso
Senior Member
Join Date: Sep 2004
Location: Canada
Old 08-12-2005 , 03:14  
Reply With Quote #2

Very nice you should link to serverdoc as well.
__________________
Sig Under Construction.
CubicVirtuoso is offline
Send a message via ICQ to CubicVirtuoso Send a message via AIM to CubicVirtuoso Send a message via MSN to CubicVirtuoso Send a message via Yahoo to CubicVirtuoso
colby
Senior Member
Join Date: Jun 2005
Location: NC
Old 08-12-2005 , 03:18  
Reply With Quote #3

You could just use amx_rcon exit/quit, and you don't need ADMIN_IMMUNITY either.

EDIT: its nice that it reconnects everyone before shutting down.
colby is offline
Send a message via AIM to colby
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 08-12-2005 , 06:27  
Reply With Quote #4

Quote:
Originally Posted by colby
You could just use amx_rcon exit/quit, and you don't need ADMIN_IMMUNITY either.

EDIT: its nice that it reconnects everyone before shutting down.
I did use that. But instead of it being sudden and unaware of, it gives the players time to realize what's going on, and it'll auto reconnect.

Serverdoc: The server saver

http://www.serverdoc.com/modules.php...wnloadPurchase
__________________

mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
Bento
SourceMod Donor
Join Date: May 2005
Location: The Netherlands
Old 08-12-2005 , 19:06  
Reply With Quote #5

OMG SERVERDOC PWNZ.. I wish i had this app 8 months ago

I configured it as a service with firedeamon
__________________
Bento is offline
Bento
SourceMod Donor
Join Date: May 2005
Location: The Netherlands
Old 08-12-2005 , 20:15  
Reply With Quote #6

Could you implement a cancel function?

amx_cancelrestart

?? please?
__________________
Bento is offline
CRAZyBUg
Member
Join Date: Jul 2005
Old 08-14-2005 , 19:11  
Reply With Quote #7

Mhh, when I add new plugins or change something, i never restart the server... i give them only a changelevel... :confused:
CRAZyBUg is offline
Bento
SourceMod Donor
Join Date: May 2005
Location: The Netherlands
Old 08-15-2005 , 09:41  
Reply With Quote #8

Quote:
Originally Posted by CRAZyBUg
Mhh, when I add new plugins or change something, i never restart the server... i give them only a changelevel... :confused:
Me 2, u dont need to restart.. Only sometimes for MM plugins.
__________________
Bento is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 08-15-2005 , 12:31  
Reply With Quote #9

This isn't very well coded... try something like this:

Code:
//Server Shutdown by Remo Williams #include <amxmodx> #include <amxmisc> new countdown = 10 public plugin_init() {     register_plugin("Server Shutdown", "1.0", "Remo Williams")     register_concmd("amx_shutdown","servershutdown",ADMIN_IMMUNITY," - shuts down server in 10 seconds") } public servershutdown(id) {     if (!(get_user_flags(id)&ADMIN_LEVEL_A))     {         console_print(id,"[AMXX] You have no access to this command")         return PLUGIN_HANDLED     }     client_print(0,print_chat,"***** Warning! Server Restart Imminent! *****")     set_task(1.0,"countdownact",_,_,_,"b")     return PLUGIN_HANDLED } public countdownact() {     countdown--     client_print(0,print_chat,"%s seconds until server restart.",countdown)     if(countdown <= 0)     {         client_cmd(0,"retry",1.5)         server_cmd("quit")     }     return PLUGIN_HANDLED }
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Pat22k
Junior Member
Join Date: Aug 2005
Old 08-15-2005 , 12:55  
Reply With Quote #10

Its a ver good i dea i think ill use it on my server
Pat22k is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:27.


Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Theme made by Freecode