AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ANY] Server maintenance [1.4 06/08/2012] (https://forums.alliedmods.net/showthread.php?t=190272)

shavit 07-16-2012 16:10

[ANY] Server maintenance [1.4 06/08/2012]
 
1 Attachment(s)
I made a nice plugin to initiate a server maintenance, you can change the server to allow admins to enter only.

Installation:
Download the plugin using the button below [Get Plugin], then drag it to addons/sourcemod/plugins to install it.
Then reload the server/change map/"sm plugins load maintenance" in rcon.

Update:
Same as installation just you can't change map for that, and reload instead of load.

Console variables:
Quote:

sm_maintenance_enabled - Is the plugin enabled? [1]
sm_maintenance_version - Plugin's version.
sm_maintenance_kick_reason - Kick reason, {name} - The player's name. (Don't add a dot in the end of the sentence) [Hey there {name}, this server is under maintenance and admins are allowed to join only]
Changelog:
Quote:

1.4 - Fixed the bug in L4D2.
1.3 - Fixed a bug that you see %N instead of player name in kick.
1.2 - Added some suggestions by Dr McKay, added "Kick reason" CVar, fixed a bug which only admins were unable to connect while a maintenance.
1.1 - Added some suggestions that Impact123 and TnTSCS suggested, added change-log.
1.0 - Initial release.

ReFlexPoison 07-16-2012 16:23

Re: Server maintenance
 
Dat one line of code ;P

11530 07-16-2012 17:19

Re: Server maintenance
 
What's wrong with setting sv_password?

shavit 07-16-2012 17:37

Re: Server maintenance
 
Quote:

Originally Posted by 11530 (Post 1751854)
What's wrong with setting sv_password?

But then admins can give the password to their friends..

Impact123 07-16-2012 18:39

Re: Server maintenance
 
Code:

if(GetUserAdmin(client) == INVALID_ADMIN_ID && gH_Enabled)
Goes to
Code:

if(gH_Enabled && GetUserAdmin(client) == INVALID_ADMIN_ID)
Pretending that this is a script that will be active 0.5% a day your script still checks every joining client for their flags, sense?
Also you should either overthink your convarchecking method or add an convarhook.
Also i would suggest you use the CheckCommandAccess function.

Yours sincerely
Impact

TnTSCS 07-16-2012 19:00

Re: Server maintenance
 
Here's an ultra cramped version, just for fun (with a few suggestions, like mentioned above):
Spoiler

Mitchell 07-16-2012 20:10

Re: Server maintenance
 
Quote:

Originally Posted by TnTSCS (Post 1751918)
Here's an ultra cramped version, just for fun (with a few suggestions, like mentioned above):
Spoiler

fixed a line:
Spoiler

shavit 07-16-2012 21:01

Re: [Any] Server maintenance [1.1 17/07/2012]
 
1.1 - Added some suggestions that Impact123 and TnTSCS suggested, added changelog.

Aqua Dark 07-17-2012 19:59

Re: [ANY] Server maintenance [1.1 17/07/2012]
 
This dose not compile on the web compiler.

shavit 07-17-2012 20:10

Re: [ANY] Server maintenance [1.1 17/07/2012]
 
Quote:

Originally Posted by Aqua Dark (Post 1752689)
This dose not compile on the web compiler.

Forum bug, from the sourcemod.net compiler it does, but from the thread it isn't.
http://gyazo.com/c2fa3567c8d04bdb1cd...png?1342569479


All times are GMT -4. The time now is 17:52.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.