Raised This Month: $150 Target: $400
 37% 

Team Ban


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Azelphur
SourceMod Donor
Join Date: Jun 2010
Plugin ID:
2216
Plugin Version:
0.3
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    16 
    Plugin Description:
    Ban players from a team
    Old 02-07-2011 , 18:41   Team Ban
    Reply With Quote #1

    This is a simple plugin to allow you to ban a player from teams, This is handy for dealing with trolls who abuse team mechanics, such as shooting all the T's on jailbreak, or not planting the bomb on CT

    It uses client preferences for storage (so MySQL/sqlite), It should work on any mod (in theory), reply here if it doesn't work on your mod.

    Commands:
    sm_teamban <name|#userid> <team> - Bans a player from <team>. Example: sm_teamban Azelphur ct
    sm_teamunban <name|#userid> <team> - Unbans a player from <team>. Example: sm_teamunban Azelphur ct

    Cvars:
    sm_teamban_disable - Use this to disable the ability to ban people from certain teams, It's a bitmask. Each team has a number, for example on CS:S 1 is spectator, 2 is counter terrorist, 4 is terrorist, add the numbers together to disable. for example to disable banning from CT and T, 2+4 = 6, so sm_teamban_disable 6. or to disable spectator and terrorist, 1+4 = 5.

    I wrote this as a paid job for XenoGamers and they have kindly asked me to post the plugin and share it with everyone


    * Changelog *
    0.3:
    Fixed missing translations
    Small optimization, switched to AddCommandListener()
    0.2:
    Fixed error messages in sm_teamban and sm_teamunban
    Attached Files
    File Type: sp Get Plugin or Get Source (teamban.sp - 2552 views - 12.2 KB)
    __________________

    Last edited by Azelphur; 02-10-2011 at 20:54.
    Azelphur is offline
    namine
    SourceMod Donor
    Join Date: Jul 2010
    Old 02-07-2011 , 19:00   Re: Team Ban
    Reply With Quote #2

    Finally, someone did this out of the goodness of their heart!
    __________________
    namine is offline
    Azelphur
    SourceMod Donor
    Join Date: Jun 2010
    Old 02-07-2011 , 19:01   Re: Team Ban
    Reply With Quote #3

    Quote:
    Originally Posted by namine View Post
    Finally, someone did this out of the goodness of their heart!
    except that I got paid to do it
    __________________
    Azelphur is offline
    SpazShot
    Senior Member
    Join Date: Nov 2009
    Old 02-07-2011 , 19:29   Re: Team Ban
    Reply With Quote #4

    Works great

    Suggestions

    • Chat notification that you banned a player.
    - [SM] John banned Frank from the CT team!
    • Menu option to ban a player from the team with a reason.
    Team Ban
    - Ban a player
    -Unban a player
    When opened you can choose the player name and then a reason such as freekilling or excessive team stacking.

    • Logging
    SpazShot is offline
    Azelphur
    SourceMod Donor
    Join Date: Jun 2010
    Old 02-07-2011 , 19:32   Re: Team Ban
    Reply With Quote #5

    Quote:
    Originally Posted by SpazShot View Post
    Works great

    Suggestions

    • Chat notification that you banned a player.
    - [SM] John banned Frank from the CT team!
    It already does this?

    Quote:
    Originally Posted by SpazShot View Post
    • Menu option to ban a player from the team with a reason.
    Team Ban
    - Ban a player
    -Unban a player
    When opened you can choose the player name and then a reason such as freekilling or excessive team stacking.

    • Logging
    It has a menu entry in /admin > player management, If I get some time when I'm very bored I might add logging and reasons, but this was a paid plugin and I don't use it on any of my servers so adding features isn't high on my priority list. Patches welcome.
    __________________
    Azelphur is offline
    SpazShot
    Senior Member
    Join Date: Nov 2009
    Old 02-07-2011 , 19:35   Re: Team Ban
    Reply With Quote #6

    It doesn't say anyone was banned from the ct team in chat. It only says they were unbanned.

    Also when I type sm_teamban in console it interferes with the use of sm_ban.


    ] sm_teamban
    [SM] Usage: sm_ban <#userid|name> <team>
    SpazShot is offline
    Azelphur
    SourceMod Donor
    Join Date: Jun 2010
    Old 02-07-2011 , 19:45   Re: Team Ban
    Reply With Quote #7

    Quote:
    Originally Posted by SpazShot View Post
    It doesn't say anyone was banned from the ct team in chat. It only says they were unbanned.
    Works for me (both console and menu), check for errors.



    Quote:
    Originally Posted by SpazShot View Post
    Also when I type sm_teamban in console it interferes with the use of sm_ban.


    ] sm_teamban
    [SM] Usage: sm_ban <#userid|name> <team>

    Cosmetic issue, it doesn't interfere, I just copied the error message from sm_ban and forgot to change it xD, fixed now.
    __________________
    Azelphur is offline
    databomb
    Veteran Member
    Join Date: Jun 2009
    Location: Boston, MA
    Old 02-07-2011 , 23:37   Re: Team Ban
    Reply With Quote #8

    Azelphur, good job and thank you for posting yours. I believe there's more than 3 different SM team bans plugins now and this is the first that's become open source, congrats!

    Do you know if xG had any errors with this? I didn't see a call to AreClientCookiesCached but maybe this isn't needed on a really fast server by the time the first respawn hits.
    databomb is offline
    Azelphur
    SourceMod Donor
    Join Date: Jun 2010
    Old 02-08-2011 , 13:46   Re: Team Ban
    Reply With Quote #9

    Quote:
    Originally Posted by databomb View Post
    Azelphur, good job and thank you for posting yours. I believe there's more than 3 different SM team bans plugins now and this is the first that's become open source, congrats!

    Do you know if xG had any errors with this? I didn't see a call to AreClientCookiesCached but maybe this isn't needed on a really fast server by the time the first respawn hits.
    I wrote this as a paid job and they use it, so I assume if they had any issues they'd shout at me :p

    You are correct, there are no calls to AreClientCookiesCached, If your MySQL server doesn't respond between OnClientAuthorized and join team (which is a good 5-10 seconds), your hard drive is probably failing or your MySQL server is on dialup in outer mongolia
    __________________

    Last edited by Azelphur; 02-08-2011 at 13:48.
    Azelphur is offline
    SpazShot
    Senior Member
    Join Date: Nov 2009
    Old 02-10-2011 , 09:09   Re: Team Ban
    Reply With Quote #10

    Code:
    L 02/09/2011 - 19:31:32: [SM] Plugin encountered error 4: Invalid parameter or parameter type
    L 02/09/2011 - 19:31:32: [SM] Native "ReplyToCommand" reported: Language phrase "No matching client" not found
    L 02/09/2011 - 19:31:32: [SM] Displaying call stack trace for plugin "teamban.smx":
    L 02/09/2011 - 19:31:32: [SM]   [0]  Line 103, /groups/sourcemod/compiler-1.3/include/commandfilters.inc::ReplyToTargetError()
    L 02/09/2011 - 19:31:32: [SM]   [1]  Line 198, /groups/sourcemod/compiler-1.3/include/helpers.inc::FindTarget()
    L 02/09/2011 - 19:31:32: [SM]   [2]  Line 312, /home/groups/alliedmodders/forums/files/8/0/1/8/0/81936.attach::Command_Teamban()
    L 02/09/2011 - 19:38:55: Error log file session closed.
    Is this a problem?
    SpazShot 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 23:12.


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