Veteran Member
|
08-22-2008
, 21:43
Simple TK Manager v1.0d Updated 5/27/2011
|
#1
|
Simple TK Manager
By Lebson506th
Description
This plugin is just a simple solution to an annoying problem: Team killers. All this plugin does is count how many times a person TKs and is not forgiven for the TK. When the TK limit is reached, it kicks or bans the player for a set amount of time. There is also a reflect damage ability where it will reflect all team damage back onto the attacker.
Note: Reflect damage does not block headshots and/or shots that kill the victim instantly. In these cases both the victim and the attacker will die.
Known Issues
- Counter-Strike: Source is acting weird with this plugin resulting in reflect damage not working.
Cvars
Code:
sm_stk_enabled (default: 1) - Enables(1) or disables(0) the plugin.
sm_stk_reflect (default: 1) - Enables(1) or disables(0) reflecting damage back onto a team attacker.
sm_stk_limit (default: 5) - Sets the number of TKs a player has to get before they are automatically kicked.
sm_stk_forgivemessage (default: 1) - Changes who the forgiven/not forgiven messages can be seen by. - 0 - Nobody
- 1 - Everyone
- 2 - People involved
- 3 - Admin and people involved
- 4 - Admins only
sm_stk_countmessage (default: 2) - Changes who the TK count message can be seen by. - 0 - Nobody
- 1 - Everyone
- 2 - People involved
- 3 - Admin and people involved
- 4 - Admins only
sm_stk_punishmessage (default: 1) - Changes who the punishment messages can be seen by. - 0 - Nobody
- 1 - Everyone
- 2 - People involved
- 3 - Admin and people involved
- 4 - Admins only
sm_stk_kickmessage (default: 1) - Show a message to everyone(1) or admin only (2) when a player is kicked for TKing. 0 to disable
sm_stk_protecttime (default: 10) - Automatically slay any team attacker in spawn during this amount of seconds after spawn
sm_stk_immunity (default: 7) - Manages admin immunity mode. - 0 - Disabled, no admin immunity.
- 1 - Admin immune to reflect damage and spawn slaying.
- 2 - Admin immune to being kicked for TKing.
- 3 - Options 1 and 2
- 4 - Admin immune to TK punishments
- 5 - Options 1 and 4
- 6 - Options 2 and 4
- 7 - Options 1, 2 and 4
sm_stk_punishmode (default: 1) - Manages the TKer punishment modes on top of kick. - 0 - No additional punishment.
- 1 - Let the victim choose.
- 2 - Use sm_stk_punishment
sm_stk_punishment (default: 1) - Manages the TKer punishment if sm_stk_punishmode = 2. - 0 - Warn
- 1 - Slay
- 2 - Burn
- 3 - Freeze
- 4 - Beacon
- 5 - Freeze Bomb
- 6 - Fire Bomb
- 7 - Time Bomb
- 8 - Drug
- 9 - Remove % Cash
- 10 - Slap
sm_stk_allowslay (default: 1) - If sm_stk_punishmode = 1, allow slaying the attacker as a punishment.
sm_stk_allowfreeze (default: 1) - If sm_stk_punishmode = 1, allow freezing the attacker as a punishment.
sm_stk_allowbeacon (default: 1) - If sm_stk_punishmode = 1, allow putting a beacon on the attacker as a punishment.
sm_stk_allowfreezebomb (defualt: 1) - If sm_stk_punishmode = 1, allow putting a freezebomb on the attacker as a punishment.
sm_stk_allowfirebomb (deault: 1) - If sm_stk_punishmode = 1, allow putting a firebomb on the attacker as a punishment.
sm_stk_allowtimebomb (default: 1) - If sm_stk_punishmode = 1, allow putting a timebomb on the attacker as a punishment.
sm_stk_drugtime (default: 10) - If sm_stk_punishmode = 1, set the time a TKer is drugged as a punishment. 0.0 to disable.
sm_stk_burntime (default: 10) - If sm_stk_punishmode = 1, set the time a TKer is burnt as a punishment. 0.0 to disable.
sm_stk_slapdamage (default: 5) - If sm_stk_punishmode = 1, slap the TKer for this amount of damage as a punishment. 0 to disable.
sm_stk_bantime (default: -1) - Manages how long a player is banned for once they reach the TK limit. (Less than 0 is a kick)
sm_stk_removecash (default: 25) - Sets the percentage of cash the victim can remove from the attacker. 0 to disable. Only for CSS.
sm_stk_logging (default: 2) - Sets the logging mode. 0 = No logging, 1 = Verbose logging, 2 = Only log TK Count and "Kicked" messages, 3 = Only log "Kicked" messages
Installation Instructions- Copy simpletk.smx to addons/sourcemod/plugins
- Copy simpletk.phrases.txt to addons/sourcemod/translations
- Using RCON, do "sm plugins load simpletk"
- It will create it's own config file in moddir/cfg/sourcemod
Special Thanks To- Cain for suggesting this in the first place and being my primary tester.
- Greyscale for trying to help the reflect portion work better.
- FeuerSturm for helping me fix a couple initial bugs and for giving me a better way to slay in spawn.
- Sgt-Mess for testing and reporting bugs, suggesting the punishments, punishment modes, for helping to test it all during the 0.7Beta-0.7Beta4 stage, for testing in insurgency exclusively, and for pointing out a documentation error on my part.
- The members of the [506th PIR] that were my guinea pigs while I tested out this plugin.
- The members of {CLR} for massive testing and bug squashing.
- tObIwAnKeNoBi for translating the plugin into german.
- WhiteWolf for helping me track down some memory issues.
- doa for suggesting the spawn protection.
- PStar for hungarian translation and pointing out a bug in my new translations.
- BAILOPAN for helping me attempt to fix slay not working in insurgency.
- Liam for helping me fix the timer errors with UnDrug.
- wapo20 for translating the plugin into Spanish.
- djloeffler007 for fixing some errors in the German translation and translating the new phrases.
- smfd for suggesting SourceBans integration.
- DJ Tsunami for helping me fix SourceBans integration.
- vintage.59 for translating the plugin into French
- 5l4v45 for translating the plugin into Polish
- monkie for showing me a small error related to clients, reminding me to change the forum compiler to 1.1, and translating the plugin into Simplified Chinese.
- klink for translating the plugin into Russian.
- Raptor10 for translating the plugin into Italian.
- deadbwoy for pointing out a few minor issues and posting fixes for them.
- WaYne82 for reporting the specifics of an admin immunity bug and testing the fix for it.
Current Languages- English
- German
- Hungarian
- Spanish
- French
- Polish
- Simplified Chinese
- Russian
- Italian
ToDo- Get translated
- Looking for suggestions
Change Log
Code:
5/27/2011 - v1.0d
- Fixed admins not being able to be punished even when sm_stk_immunity was set to 0
- Fixed a rare error when sm_stk_punishment was set to something invalid.
5/26/2011 - v1.0c
- Fixed a small error in the French translations
- Fixed a small error in the chat printing.
4/12/2009 - v1.0b
- Added automatic changing of "mp_spawnprotecttime" to 0 on plugin start if it is available.
- Removed supper for Resistance and Liberation because it doesn't report events required to make this plugin work.
3/1/2009 - v1.0a - Fixed a small error related to invalid clients.
- Reverted some small code changes to prevent more errors like this.
2/28/2009 - v1.0 - Added logging into its own file. The file is located in sourcemod/logs/stk_log_mmddyy.log.
- Added logging of every message so you know the progress of people TKing rather than just when they are kicked.
- Added sm_stk_loggin to manage the logging behavior.
- Changed code to use MaxClients variable introduced in SourceMod 1.1
- Changed code to clean it up a little.
- Removed redundant check for insurgency support.
10/5/2008 - v0.9 - Thanks to FeuerSturm, the in-spawn slaying now works a lot better and I was able to drop my ridiculous work around.
- Changed some code around to maybe reduce the possibility of the auto-forgive bug more.
9/29/2008 - v0.8e - Fixed SourceBans integration. For real this time =)
- Removed the need for a seperate include file. Now compiles on the forum and the web compiler.
9/29/2008 - v0.8d - Fixed SourceBans integration.
9/27/2008 - v0.8c - Changed version CVAR to not get added to the auto-created config.
- Added automatic MySQL Banning and SourceBans integration if banning is enabled (sm_stk_bantime >= 0)
9/10/2008 - v0.8b - Shifted around some code to reduce the probability of the auto-forgive bug, if not eliminate it.
- Removed some redundant and useless code.
- Fixed a possible bug where a client was being queried even after they had been kicked.
9/9/2008 - v0.8a - Fixed a bug where forgiving a player meant that you forgived everyone until you rejoined.
- Fixed sm_stk_drugtime and sm_stk_burntime defaulting to 1 instead of 10
- Fixed the "warn" punishment not displaying according to the punishment message CVAR.
9/8/2008 - v0.8 - Changed the plugin to auto-generate a config file in cfg/sourcemod.
- Added slap, firebomb, freezebomb, timebomb, and removal of money as punishments.
- Added CVARs to enable and disable the new punishments.
- Changed translations to reflect the new punishments.
- Changed sm_stk_punishment to reflect the new punishments.
9/3/2008 - v0.7f - Fixed passed handler error for the undrug function.
- Fixed a future error where the script would try to punish a player after the map changed and end up punishing the wrong person (or throwing an error).
9/2/2008 - v0.7e - Small tweak to fix insurgency error messages. (Other mods don't need to update)
9/2/2008 - v0.7d - Fixed punishment menu not showing up.
- Fixed TK immunity when sm_stk_immunity was set to 0
- Fixed wrong punishments when not all were enabled
9/2/2008 - v0.7c - Changed something I was testing that was probably causing crashes.
9/1/2008 - v0.7b - Fixed slay not working in insurgency.
8/31/2008 - v0.7a - Fixed a bug where the client was less than 0.
- Fixed an array out of bounds error.
- Fixed some bugs where I was trying to reset a variable of a client that was no longer connected.
- Added more checks to hopefully fix the auto-forgive bug.
8/30/2008 - v0.7 - Everything from v0.7Beta to v0.7Beta4
- Added some variable checks to prevent future errors
- Added some attacker/client checks to hopefully eliminate the auto-forgive bug.
8/29/2008 - v0.7Beta4 - Fixed CVARs sm_stk_burntime and sm_stk_drugtime
- Added sm_stk_bantime that manages how long a player is banned for once they reach the TK limit. (Less than 0 is a kick)
8/29/2008 - v0.7Beta3 - Changed sm_stk_allowburn to sm_stk_burntime to change the length of the burn punishment. 0.0 to disable.
- Changed sm_stk_allowdrug to sm_stk_drugtime to change the length of the drug punishment. 0.0 to disable.
- Fixed a drugged player not undrugging.
- Fixed a punishment not working if the attacker was dead from reflected damage. (Punishment will happen on next spawn. Possible delay of up to 5 seconds after it).
8/29/2008 - v0.7Beta2 - Fixed the sm_stk_punishmode 2 not working.
- Fixed displaying the punishment menu to the wrong client. (Letting the attacker punish the victim is bad)
- Fixed Burn not working.
- Fixed Freeze not working.
- Fixed admins not being immune to TK punishments when sm_stk_immunity was set to protect them.
8/29/2008 - v0.7Beta - Fixed a bug where admin were not immune to spawn slaying if they killed the victim.
- Added two punishment modes. 1, the victim gets to choose a punishment from a menu. 2, the admin defines a pre-set punishment, 0 disables.
- Added sm_stk_punishmode, sm_stk_punishment, sm_stk_allowslay, sm_stk_allowburn, sm_stkallowfreeze, sm_stk_allowbeacon, and sm_stk_allowdrug. See documentation.
- Changed sm_stk_immunity to account for the new punishments. Now defaults to 7, as well as multiple additions. See documentation.
8/27/2008 - v0.6 - Added sm_stk_immunity cvar to change admin immunity.
- 0 - Disabled, no admin immunity.
- 1 - Admin immune to reflect damage and spawn slaying.
- 2 - Admin immune to being kicked for TKing.
- 3 - Both options 1 and 2
- Changed translations to work with the new command. (Update both files)
8/25/2008 - v0.5a - Changed the auto-forgive to be more consistent.
- Fixed a bug where slaying in spawn wouldn't work if reflect damage was turned off sometimes.
- Changed display to show when a player was slayed for too much TA vs. TAing in spawn. (Update translations)
8/24/2008 - v0.5 - Changed how the message management was done to clean it up a bit.
- Fixed a bug where an invalid client was being referenced.
- Changed the kick message to show the kicked player's Steam ID (update translations)
- Added logging to show who is kicked for TKing.
- Fixed a bug where the player would sometimes not be killed after a TK with reflect damage on.
- Changed the in spawn killing routine to make sure the person dies. (No more stuck in the skybox)
- Added German translations thanks to tObIwAnKeNoBi
- Removed some unneeded code.
- Added the ability to slay spawn attackers for a certain amount of time after the victim spawns.
- Added sm_stk_protecttime to manage this function.
- If a player still has a forgive menu open, all TKs done to that player are now autoforgiven.
- Removed the "exit" button from the forgive menu. It is a yes or no question, make a choice.
- Fixed the memory leaks and crashes. (Yay)
8/23/2008 - v0.4 - Fixed TK count not being reset after a player is kicked.
- Fixed a bug where TKers in spawn would not die with reflect damage enabled. (If players are alive after being "suicided" their health is set to 1 and then they are dropped a large distance to their death)
- Changed the way i did reflect damage (it was based on the first version of Reflect Team Damage instead of the second)
- Changed "sm_stk_messagetype" to "sm_stk_forgivemessage"
- Added a message that informs the TKer of how many TKs they have and how many they need until they are kicked.
- Added "sm_stk_countmessage" to manage who sees this message.
- Added "sm_stk_kickmessage" to manage who sees the message when a player is kicked for TKing.
- Fixed a bug where the TK manager would not work if reflect was off.
8/23/2008 - v0.3 - Fixed some minor warning.
- Fixed menu not showing up properly.
- Fixed bugs where client was <= 0
8/22/2008 - v0.2 - Added the ability to forgive players who TKed from a menu.
- Added a CVAR to change the who the forgive/did not forgive messages are displayed to.
8/22/2008 - v0.1
__________________
Last edited by Lebson506th; 05-27-2011 at 12:36.
Reason: 1.0d
|
|