Raised This Month: $32 Target: $400
 8% 

[ANY] Server maintenance [1.4 06/08/2012]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Plugin ID:
3092
Plugin Version:
1.4
Plugin Category:
Technical/Development
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Allows to initiate a server maintenance to allow admins to join only.
    Old 07-16-2012 , 16:10   [ANY] Server maintenance [1.4 06/08/2012]
    Reply With Quote #1

    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.
    Attached Files
    File Type: sp Get Plugin or Get Source (maintenance.sp - 1447 views - 1.7 KB)
    __________________
    retired

    Last edited by shavit; 08-05-2012 at 22:55.
    shavit is offline
    ReFlexPoison
    ☠☠☠
    Join Date: Jul 2011
    Location: ☠☠☠
    Old 07-16-2012 , 16:23   Re: Server maintenance
    Reply With Quote #2

    Dat one line of code ;P
    ReFlexPoison is offline
    11530
    Veteran Member
    Join Date: Sep 2011
    Location: Underworld
    Old 07-16-2012 , 17:19   Re: Server maintenance
    Reply With Quote #3

    What's wrong with setting sv_password?
    __________________
    11530 is offline
    shavit
    AlliedModders Donor
    Join Date: Dec 2011
    Location: Israel
    Old 07-16-2012 , 17:37   Re: Server maintenance
    Reply With Quote #4

    Quote:
    Originally Posted by 11530 View Post
    What's wrong with setting sv_password?
    But then admins can give the password to their friends..
    __________________
    retired
    shavit is offline
    Impact123
    Veteran Member
    Join Date: Oct 2011
    Location: Germany
    Old 07-16-2012 , 18:39   Re: Server maintenance
    Reply With Quote #5

    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
    __________________

    Last edited by Impact123; 07-16-2012 at 18:42.
    Impact123 is offline
    TnTSCS
    AlliedModders Donor
    Join Date: Oct 2010
    Location: Undisclosed...
    Old 07-16-2012 , 19:00   Re: Server maintenance
    Reply With Quote #6

    Here's an ultra cramped version, just for fun (with a few suggestions, like mentioned above):
    Spoiler
    __________________
    View my Plugins | Donate
    TnTSCS is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 07-16-2012 , 20:10   Re: Server maintenance
    Reply With Quote #7

    Quote:
    Originally Posted by TnTSCS View Post
    Here's an ultra cramped version, just for fun (with a few suggestions, like mentioned above):
    Spoiler
    fixed a line:
    Spoiler
    Mitchell is offline
    shavit
    AlliedModders Donor
    Join Date: Dec 2011
    Location: Israel
    Old 07-16-2012 , 21:01   Re: [Any] Server maintenance [1.1 17/07/2012]
    Reply With Quote #8

    1.1 - Added some suggestions that Impact123 and TnTSCS suggested, added changelog.
    __________________
    retired
    shavit is offline
    Aqua Dark
    AlliedModders Donor
    Join Date: Aug 2009
    Location: Canada
    Old 07-17-2012 , 19:59   Re: [ANY] Server maintenance [1.1 17/07/2012]
    Reply With Quote #9

    This dose not compile on the web compiler.
    __________________
    Aqua Dark is offline
    shavit
    AlliedModders Donor
    Join Date: Dec 2011
    Location: Israel
    Old 07-17-2012 , 20:10   Re: [ANY] Server maintenance [1.1 17/07/2012]
    Reply With Quote #10

    Quote:
    Originally Posted by Aqua Dark View Post
    This dose not compile on the web compiler.
    Forum bug, from the sourcemod.net compiler it does, but from the thread it isn't.
    __________________
    retired
    shavit 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 14:46.


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