Raised This Month: $53 Target: $400
 13% 

[ANY] CT Bans


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Addicted.
AlliedModders Donor
Join Date: Dec 2013
Location: 0xA9D0DC
Plugin ID:
5537
Plugin Version:
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Old 02-19-2017 , 15:54   [ANY] CT Bans
    Reply With Quote #1

    CT Bans

    Plugin:

    I created this plugin because it was requested by a friend and he was happy to have it released publicly. This hasn't been tested a crazy amount but it has been running on an active server for a while now with no complaints. Bans are handled through a MySQL database where each ban has a new row. It should support any game but it has only been tested on CS:GO. I am looking for more ideas and features to incorporate into this plugin and possibly a web panel coming soon to edit and display the bans.

    For now this requires this include to compile but will be removed soon

    MyJailbreak ratio supported

    Install:
    1. Place ctbans.smx in the plugins folder
    2. Place ctbans_reasons.txt in the configs folder
    3. Create an entry for "ctbans" in databases.cfg
    4. Load the plugin
    5. Edit ctbans.cfg in cfg/sourcemod/
    6. Done!

    Cvars:

    Code:
    // Sound to play to player when denied CT entry (Default included in CS:GO)
    // -
    // Default: "buttons/button11.wav"
    ctbans_block_sound "buttons/button11.wav"
    
    // Chat prefix to use for all messages (Include space at end)
    // -
    // Default: "[SM] "
    ctbans_chat_prefix "[SM] "
    
    // Amount of minutes to keep a player in the rage ct ban menu
    // -
    // Default: "10"
    ctbans_rage_length "10"
    Commands:
    • sm_isbanned
      • !isbanned
      • !isbanned <player>
    • sm_ctban
      • *NOTE* Time can be accepted as 1s, 2m, 3h, 4d, 5w, ect
      • !ctban (Result: Menu with player, time, and reason)
      • !ctban <player> (Result: Menu with time and reason)
      • !ctban <player> <time> (Result: Menu with reason)
      • !ctban <player> <time> <reason>
    • sm_unctban
      • !unctban <player>
    • sm_offlinectban
      • !offlinectban
    • sm_ragectban
      • !ragectban

    Include File (For Developers):

    Code:
    /*********************************************************
     * returns if client is CT Banned
     *
     * @param client The client to run the check on
     * @true on banned, false if not
     *********************************************************/
    native CTBans_IsCTBanned(int client);
    Let me know if you want any more natives added

    TODO:
    • Translation Support

    Credits:
    • My friend for the idea
    • databomb for the original plugin (Thread)



    Download:

    ZIP | Source

    Last edited by Addicted.; 02-20-2017 at 12:44.
    Addicted. is offline
    shanapu
    Veteran Member
    Join Date: Apr 2015
    Location: .de
    Old 02-20-2017 , 11:19   Re: [ANY] CT Bans
    Reply With Quote #2

    Keep up your great work!

    Quote:
    Originally Posted by oaaron99 View Post
    Support from MyJailbreak will be added as soon as shanapu comes online: https://github.com/shanapu/MyJailbreak/issues/180
    Just released Beta 11 of MyJailbreak with support for your CT Bans plugin.
    __________________
    free software
    coding
    shanapu is offline
    Drixevel
    AlliedModders Donor
    Join Date: Sep 2009
    Location: Somewhere headbangin'
    Old 02-20-2017 , 15:17   Re: [ANY] CT Bans
    Reply With Quote #3

    Seems like more functions here: https://forums.alliedmods.net/showthread.php?p=2337829
    __________________
    Discord: Drixevel#9016 - Steam Profile - Github (Taking paid work currently, add me on Discord)
    Drixevel is offline
    Addicted.
    AlliedModders Donor
    Join Date: Dec 2013
    Location: 0xA9D0DC
    Old 02-20-2017 , 15:32   Re: [ANY] CT Bans
    Reply With Quote #4

    Quote:
    Originally Posted by redwerewolf View Post
    Only feature that plugin has that this one doesn't is banning the other team from what I can see.

    And anyway this wasn't created to compete against other plugins, I made it as a free request and released it cause why not.
    Addicted. is offline
    Caaine
    Member
    Join Date: Oct 2013
    Old 03-10-2017 , 14:36   Re: [ANY] CT Bans
    Reply With Quote #5

    when a player banned he can join the CT Team :S
    Caaine is offline
    Marc0504
    Junior Member
    Join Date: Jul 2013
    Location: Denmark
    Old 03-10-2017 , 16:35   Re: [ANY] CT Bans
    Reply With Quote #6

    Hello! I love your plugin! It's nice and simple, and perfect for a jailbreak server..
    ..Just got one request tho..
    Is it possible to make a command which deletes the "ban history" of a player?
    For example: I tested the CTban on myself, and now, everytime I join, I'm getting reminded in the chat that I have been CTbanned before.. I wish for a command that removes a players history (maybe bound to Z flag)


    And to Caaine:
    Quote:
    Originally Posted by Caaine View Post
    when a player banned he can join the CT Team :S
    Are you sure you have set up your database right? I'm no pro, but I reckon the problem could come from that.
    Marc0504 is offline
    SeatloN
    Junior Member
    Join Date: Sep 2016
    Location: Írebro Sweden
    Old 04-05-2017 , 08:16   Re: [ANY] CT Bans
    Reply With Quote #7

    What type of ban is this plugin generating ? is it on server played time or is it just the given amount of time that are set ?

    Best regards SeatloN
    SeatloN is offline
    Send a message via Skype™ to SeatloN
    Bobakanoosh
    Senior Member
    Join Date: Sep 2015
    Location: United States
    Old 04-17-2017 , 21:15   Re: [ANY] CT Bans
    Reply With Quote #8

    Quote:
    Originally Posted by SeatloN View Post
    What type of ban is this plugin generating ? is it on server played time or is it just the given amount of time that are set ?

    Best regards SeatloN
    It's based on time spent alive.
    Bobakanoosh is offline
    Vaultic
    Junior Member
    Join Date: Apr 2017
    Old 04-21-2017 , 06:51   Re: [ANY] CT Bans
    Reply With Quote #9

    I seem to be having a problem with this plugin, and i'm guessing its because i've setup my databases.cfg wrong.

    The plugin works but if a player re connects to the server there ban goes and they can join ct again and i get this error in console: L 04/21/2017 - 11:28:24: [ctbans.smx] (GetCTBanData) Query failed for client 'Nathan': no such table: ctbans
    isn't the plugin supposed to create the table itself?

    my databases.cfg
    "ctbans"
    {
    "driver" "sqlite"
    "host" "localhost"
    "database" "db11779"
    "user" "db11779"
    "pass" ""
    //"timeout" "0"
    //"port" "0"
    }
    Vaultic is offline
    mrkos9i4ok
    Member
    Join Date: Jul 2016
    Location: Russia,Moscow
    Old 06-15-2017 , 01:25   Re: [ANY] CT Bans
    Reply With Quote #10

    Can you put all this into the admin menu?
    mrkos9i4ok 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 12:11.


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