Thread: [ANY] CT Bans
View Single Post
Author Message
Addicted.
AlliedModders Donor
Join Date: Dec 2013
Location: 0xA9D0DC
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