[ANY]Warning system[UPDATED 2011-12-12]
3 Attachment(s)
Requirements: MySQL database. Colors snippet SourceBans MySQL table(execute this in your database): PHP Code:
This plugin gives admin ability to warn player. After the player reaches warnings thereshold, he gets punished. There are two ways to punish player: KICK, or BAN. BAN time is currently changeable in .cfg. All the data is stored in MySQL(id, nick, steam_id, warn, admin, reason). Features: Admin can warn player easily, without saying him anything, or begging. Option to choose punishment. Option to choose max warning thereshold. Option to choose punishments reason. Option to choose ban lenght. Players can check their warnings by typing in chat !mywarn or /mywarn. v1.0alpha features: Option to punish player every warn. Option to enable warn sound. 6 Different EVERY warn punishment options: 1- Kick 2- Freeze 3- Slap 4- Slay 5- Freeze until agreement(player must read rules, before unfreeze) 6- Ban Option to customize freeze time Option to customize slap damage Option to customize agreement word(chat triggered) Option to customize ban lenght Option to double ban time, each warn player gets. Warn system announcement. Adminmenu integration Reasons storage in MySQL Admin storage in MySQL SourceBans support Translanslations support http://www.eurocss.lt/images/warn_image.jpg http://www.eurocss.lt/images/warn_image2.jpg Command Usage: sm_warn <nick> <reason> !mywarn or /mywarn - displays your warnings status. ConVars: warn_version : Plugin version warn_system "1" : Enables/disables Warning System plugin. Default: 1 warn_ban_reason "[WARN] You've been bad boy. Take a rest" : Ban punishment reason. Default: "[WARN] You've been bad boy. Take a rest" warn_ban_time "60" : Ban punishment lenght in minutes. Default: 60 minutes. warn_kick_reason "[WARN] Slow down, Bieber" : Kick punishment reason. Default: "[WARN] Slow down, Bieber" warn_max "5" : Maximum warnings thereshold. Default: "5" warn_punishment "2" : Punishment. 1-Kick 2- Ban. Default: 2 v1.0alpha ConVars: warn_punish_every "1" : Ability to punisher client every warn they get <1-enable, 2-disable> warn_punishment_sound "1" : Punishment sound for client, every warn. <1-enable, 2-disable> warn_every_warn_bantime "5" : How long to ban player every warn. Minutes. warn_every_warn_bantime_double "1" : Double bantime then getting more warns. warn_every_punishment "5" : Punishment for every warn client gets. <1-kick, 2-freeze, 3-slap, 4-slay, 5-chat agreement(with freeze) 6- ban>. warn_agreemen_word "sutinku" : Agreement word, which must be typed. Required: <warn_every_punishment 5> warn_freeze_time "5.0" : Warn freeze time. Required: <warn_every_punishment 2> warn_slap_damage "30" : Warn slap time. Required: <warn_every_punishment 3>" warn_announce "1" : Warning announcement." Languages supported: • Lithuanian • English Special thanks: Peace-Maker - you helped me a lot with those MySQL functions. Thanks EuroCSS.LT - inspires me to develop something new. Changes: v1.0alpha • Option to punish player every warn. • Option to enable warn sound. • 6 Different EVERY warn punishment options: 1- Kick 2- Freeze 3- Slap 4- Slay 5- Freeze until agreement(player must read rules, before unfreeze) 6- Ban • Option to customize freeze time • Option to customize slap damage • Option to customize agreement word(chat triggered) • Option to customize ban lenght • Option to double ban time, each warn player gets. • Warn system announcement. • Adminmenu integration • Reasons storage in MySQL • Admin storage in MySQL • SourceBans support • Translanslations support v0.4a • Replaced all the queries to SQL_TQueries(Thearded), and added Thearded connection, so it wont lag anymore(Thanks to Peace-Maker) • Added ConsoleCmd for /mywarn • Added Public notify cvar. |
Re: [CS:S] Warning system
Nice Idea :)
Can you add to the database see why someone would receive a warning? Or in /mywarn that there is a list, why somebody receive a warn? |
Re: [CS:S] Warning system
Can this also work for TF2 as well? or L4D2? It seems like an interesting idea to keep people in check. :3
|
Re: [CS:S] Warning system
Quote:
@MindeLT: Nice release! That was fast:) Some suggestions: You should only use SQL_TQuery's and store the database handle globally instead of opening a new connection every time and closing it. (You don't close it in your say hook btw.) Use SQL_TConnect as the wiki shows you. Especially the SELECT queries should be threaded, as they have to receive information back, which could lag your server. You need to add a public versioning convar (FCVAR_NOTIFY) to get this approved. You could register a 'sm_mywarn' console command instead of hooking the say command. Those commands are automatically chattriggers like /mywarn and !mywarn depending on the sourcemod settings. |
Re: [CS:S] Warning system
Quote:
Quote:
@Peace-Maker Thanks for advises! I'll fix those soon :) |
Re: [CS:S] Warning system
nice
|
Re: [CS:S] Warning system
1 Attachment(s)
hello
how to solve problem please? I join the log of error |
Re: [CS:S] Warning system
Quote:
But nice idea, good luck ;) |
Re: [CS:S] Warning system
I'll fix this, adding only thearded queries, as Peace-Maker sayed, so it wont be any timeout. At the moment, i'm having problems with my Dedicated Server(optimizing Kernel), so don't really have time to fix it :)
@Angel635: add mysql connection to database.cfg Plugin uses default database setup. |
Re: [CS:S] Warning system
You should add SQLite support. Basically, just look was is configured and change between :
PHP Code:
PHP Code:
|
All times are GMT -4. The time now is 04:35. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.