AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Anti-TK Manager (Version 1.1.3 / Updated January 19 2011) (https://forums.alliedmods.net/showthread.php?t=80554)

Rothgar 11-15-2008 20:29

Anti-TK Manager (Version 1.1.3 / Updated January 19 2011)
 
7 Attachment(s)
Anti-TK Manager

This plugin was originally inspired off FlyingMongoose's "ATAC Control" a number of you people probably already know of ATAC from the AMXModX days and then SourceMod as well. We were having a number of problems with the SourceMod version and when reading through the code and trying to understand what was going on got so confused at excess/redundant code. At that point I decided to make a new Anti-TK plugin that worked with the mod I was interested in at the time Zombie Panic Source. I decided to go with a different approach, rather than re-invent the wheel, I utilized the current funcommand methods for my punishments. I believe this plugin has very clean code but a lot of features are not fully completed/implemented and I would like some community feedback before I continue. I have spoken to FlyingMongoose and he is happy to also help with this plugin and his ATAC can be found here http://forums.alliedmods.net/showthread.php?p=479235.

I am not sure what versions of SourceMod this requires have not tested it with lower versions. I have created cvars and compile options to disable features. If you disable through the compile variables it will decrease the code/plugin size. let me know what you are looking for and would like to see.

Information

This plugin has been designed to handle Anti-TK players. It currently contains a small subset of the features of ATAC however most of the code is there and the rest should be easy to add. If there is a feature you are looking for let me know. I am currently aware that if a TK'er dies when TK'ing you, and you punish them while they are dead I believe they will not get punished. But please report any abnormalities you find.

Requirements
SourceMod v1.3.1+

For SourceBans support you need the following:
You need to compile the plugin manually with the sourcebans.inc as per the compile instructions above.

You need to be running the latest SVN version of the SourceMod SourceBans plugin so we can detect the plugin properly as we are using new features. Currently you need to manually compile the latest version of the plugin from:

http://code.google.com/p/sourcebans/source/browse/#svn/trunk/game_upload/addons/sourcemod/scripting%3Fstate%3Dclosed

Installation Details

Download the "antitk.phrases.txt" translation file and save to your addons\sourcemod\translations directory.

Pre-compiled:
Download the "antitk.smx" and save to your addons\sourcemod\plugins directory.
This version does not have SourceBans support.

Self-Compile:
Download the "antitk.sp" and save to your addons\sourcemod\scripting directory.
Create a directory called "antitk" in the "scripting" folder so you have the following addons\sourcemod\scripting\antitk
Download the "funcommands.sp" and save to the addons\sourcemod\scripting\antitk directory you just created.
Download the "keyvalues.sp" and save to the addons\sourcemod\scripting\antitk directory.

Code:

If you want SourceBans support and have SourceBans running:
Download the sourcebans.inc from:
http://sourcebans.googlecode.com/svn/trunk/game_upload/addons/sourcemod/scripting/include/sourcebans.inc

Save this file in the addons\sourcemod\scripting\include directory.

Code:

To Compile with Debug Enabled:

Open the "antitk.sp" in a text editor and set "_DEBUG" to 1

Compile the plugin and install as per normal.


Server ConVars
  • sm_antitk_version - Version of Anti-TK Manager. (No edit)
  • sm_antitk_enable - Is the Anti-TK Manager enabled or disabled? [0 = FALSE, 1 = TRUE]
  • sm_antitk_admins_immune - Are Admins immune to the Anti-TK Manager? [0 = FALSE, 1 = TRUE]
  • sm_antitk_admins_flag - Admin Flag for immunity? Leave Blank for any flag.
  • sm_antitk_round_start_protect_time - Time in seconds the Anti-TK Manager Round Start Protection should take effect. [0 = DISABLED]
  • sm_antitk_round_start_type - Type of action that is taken during the Round Start Protection? [0 = FORGIVE, 1 = SLAY, 2 = SLAP, 3 = BEACON, 4 = BURN, 5 = FIRE BOMB, 6 = FREEZE, 7 = FREEZE BOMB, 8 = SLOW, 9 = BLIND, 10 = DRUG, 11 = TIME BOMB, 12 = RESOURCES, 100 = NO FORGIVE]
  • sm_antitk_round_start_exclude - Should we exclude TK's from being tracked during the Round Start Protection? [0 = FALSE, 1 = TRUE]
  • sm_antitk_max - Maximum number of TK's allowed before Kick/Ban action occurs.
  • sm_antitk_karma_kills - Number of enemy kills required to remove a TK point. [DEFAULT: 10]
  • sm_antitk_type - Type of action that is taken once the TK limit has been exceeded? [0 = NOTHING, 1 = KICK, 2 = BAN]
  • sm_antitk_ban_time - Time in minutes player should be banned for excessive TK's. [DEFAULT: 60 minutes] (If sm_antitk_type is set to 2)
  • sm_antitk_purge_time - Time in seconds TKer data should be kept before purging. [DEFAULT: 30 minutes]
  • sm_antitk_mirror_type - Type of mirrored damage for when a player is attacked by team player? [0 = NONE, 1 = ATTACKER, 2 = ATTACKER + RETURN HEALTH]
  • sm_antitk_mirror_percent - Mirror damage percent that is returned to attacker? [DEFAULT: 100 Percent]
  • sm_antitk_mirror_slap - Should we slap the attacker when mirroring damage? [0 = FALSE, 1 = TRUE]
  • sm_antitk_beacon - Is the Anti-TK Manager Beacon option enabled or disabled? [0 = FALSE, 1 = TRUE]
  • sm_antitk_beacon_radius - Anti-TK Manager radius for beacon's light rings. [DEFAULT: 375]
  • sm_antitk_burn - Is the Anti-TK Manager Burn option enabled or disabled? [0 = FALSE, 1 = TRUE]
  • sm_antitk_burn_duration - Anti-TK Manager Burn Duration. [DEFAULT: 20 seconds]
  • sm_antitk_firebomb - Is the Anti-TK Manager FireBomb option enabled or disabled? [0 = FALSE, 1 = TRUE]
  • sm_antitk_firebomb_fuse - Anti-TK Manager FireBomb fuse length. [DEFAULT: 10 seconds]
  • sm_antitk_firebomb_radius - Anti-TK Manager FireBomb blast radius. [DEFAULT: 600]
  • sm_antitk_firebomb_mode - Who is targeted by the Anti-TK Manager FireBomb? [0 = ATTACKER, 1 = TEAM, 2 = EVERYONE]
  • sm_antitk_freeze - Is the Anti-TK Manager Freeze option enabled or disabled? [0 = FALSE, 1 = TRUE]
  • sm_antitk_freeze_duration - Anti-TK Manager Freeze Duration. [DEFAULT: 10 seconds]
  • sm_antitk_freezebomb - Is the Anti-TK Manager FreezeBomb option enabled or disabled? [0 = FALSE, 1 = TRUE]
  • sm_antitk_freezebomb_fuse - Anti-TK Manager FreezeBomb fuse length. [DEFAULT: 10 seconds]
  • sm_antitk_freezebomb_radius - Anti-TK Manager FreezeBomb blast radius. [DEFAULT: 600]
  • sm_antitk_freezebomb_mode - Who is targeted by the Anti-TK Manager FreezeBomb? [0 = ATTACKER, 1 = TEAM, 2 = EVERYONE]
  • sm_antitk_timebomb - Is the Anti-TK Manager TimeBomb option enabled or disabled? [0 = FALSE, 1 = TRUE]
  • sm_antitk_timebomb_fuse - Anti-TK Manager TimeBomb fuse length. [DEFAULT: 10 seconds]
  • sm_antitk_timebomb_radius - Anti-TK Manager TimeBomb blast radius. [DEFAULT: 600]
  • sm_antitk_timebomb_mode - Who is targeted by the Anti-TK Manager TimeBomb? [0 = ATTACKER, 1 = TEAM, 2 = EVERYONE]
  • sm_antitk_slow - Is the Anti-TK Manager Slow option enabled or disabled? [0 = FALSE, 1 = TRUE]
  • sm_antitk_slow_speed - Anti-TK Manager Slow Speed Multiplier. [DEFAULT: 0.4]
  • sm_antitk_slow_gravity - Anti-TK Manager Slow Gravity Multiplier. [DEFAULT: 1.4]
  • sm_antitk_blind - Is the Anti-TK Manager Blind option enabled or disabled? [0 = FALSE, 1 = TRUE]
  • sm_antitk_blind_amount - Anti-TK Manager Blind Amount. [DEFAULT: 230]
  • sm_antitk_drug - Is the Anti-TK Manager Drug option enabled or disabled? [0 = FALSE, 1 = TRUE]
  • sm_antitk_slap - Is the Anti-TK Manager Slap option enabled or disabled? [0 = FALSE, 1 = TRUE]
  • sm_antitk_slap_damage - Anti-TK Manager Slap Damage. [DEFAULT: 50 health]
  • sm_antitk_slay - Is the Anti-TK Manager Slay option enabled or disabled? [0 = FALSE, 1 = TRUE]
  • sm_antitk_special_slay - Should we use a special version of the slay? (May not work with all mods) [0 = FALSE, 1 = TRUE]
  • sm_antitk_resources - Is the Anti-TK Manager resource remove option enabled or disabled? [0 = FALSE, 1 = TRUE]
  • sm_antitk_resource_steal - Should the Anti-TK resource option give resources to the victim? [0 = FALSE, 1 = TRUE]
  • sm_antitk_resource_amount - Anti-TK Manager resource removal amount. (0.0-1.0 equates to a percentage, otherwise it's an amount) [DEFAULT: 0.20 (20%)]
Change Log

* See the antitk.changelog.txt for old version information.
  • 1.1.0 - Fixed: Error with Stat TK log message when TK'er had left the game. Error hooking round start protection properly. Error detecting round protection incorrectly for early mirror damage. Menu items not using correct values. Punishments were wrong for No Forgive. Bug where Mirror Damage would be disabled after disabling round start protection. Added: Added slay message for Mirror Damage attacker Slaying. Resource punishment removal. Added slap option for Mirror Damage.
  • 1.1.1 - Added Burn Punishments. Also added Mirror Damage Percentage & Resource Stealing Options. Fixed a few errors in relation to players leaving during punishment selections.
  • 1.1.2 - Fixed Mirror Damage Slap Hooking. Also fixed Mirror Damage Slap not working with the correct percentages now that this has been created.
  • 1.1.3 - Fixed error with no forgive internal notify error and some wrong death checks where round protection TK Menu's would not show and karma calulations would not work.

Please let me know if you experience any issues or problems.

Other plugins made by me:

AFK Manager (Any Mod): http://forums.alliedmods.net/showthread.php?p=708265

DJ Tsunami 11-16-2008 06:58

Re: Anti-TK Manager
 
Quote:

Originally Posted by Rothgar (Post 714326)
I decided to go with a different approach, rather than re-invent the wheel, I utilized the current funcommand methods for my punishments.

ATAC 2.5.0 also utilizes funcommands ;) ATAC 2.0.0 doesn't work well anymore, so it's recommended to use 2.5.0, which can be found under Development in the first post.

FlyingMongoose 11-17-2008 02:24

Re: Anti-TK Manager
 
What's tsunami is saying is...you are reinventing the wheel...just polishing it up ;).

Rothgar 11-17-2008 02:28

Re: Anti-TK Manager
 
Quote:

Originally Posted by FlyingMongoose (Post 714808)
What's tsunami is saying is...you are reinventing the wheel...just polishing it up ;).

Using the Shine-o-Wheel :)

Now back on-topic, people can feel free to test and provide feedback :)

FlyingMongoose 11-17-2008 02:33

Re: Anti-TK Manager
 
Well, after sifting through your source, I'll approve it.

Rothgar 11-26-2008 03:13

Re: Anti-TK Manager
 
New Version 1.0.4 Released.

sLuGo 11-26-2008 12:58

Re: Anti-TK Manager
 
Any help would be appreciated!
Running latest Insurgency server with 1.1.0-dev SM


L 11/26/2008 - 11:55:51: [SM] Native "GetConVarBool" reported: Invalid convar handle 0 (error 4)
L 11/26/2008 - 11:55:51: [SM] Displaying call stack trace for plugin "antitk.smx":
L 11/26/2008 - 11:55:51: [SM] [0] Line 468, antitk.sp::(null)()
L 11/26/2008 - 11:55:51: [SM] [1] Line 370, antitk.sp::(null)()
L 11/26/2008 - 11:56:05: [SM] Native "GetConVarBool" reported: Invalid convar handle 0 (error 4)
L 11/26/2008 - 11:56:05: [SM] Displaying call stack trace for plugin "antitk.smx":
L 11/26/2008 - 11:56:05: [SM] [0] Line 468, antitk.sp::(null)()
L 11/26/2008 - 11:56:05: [SM] [1] Line 370, antitk.sp::(null)()

Rothgar 11-26-2008 16:52

Re: Anti-TK Manager
 
Quote:

Originally Posted by sLuGo (Post 718663)
Any help would be appreciated!
Running latest Insurgency server with 1.1.0-dev SM


L 11/26/2008 - 11:55:51: [SM] Native "GetConVarBool" reported: Invalid convar handle 0 (error 4)
L 11/26/2008 - 11:55:51: [SM] Displaying call stack trace for plugin "antitk.smx":
L 11/26/2008 - 11:55:51: [SM] [0] Line 468, antitk.sp::(null)()
L 11/26/2008 - 11:55:51: [SM] [1] Line 370, antitk.sp::(null)()
L 11/26/2008 - 11:56:05: [SM] Native "GetConVarBool" reported: Invalid convar handle 0 (error 4)
L 11/26/2008 - 11:56:05: [SM] Displaying call stack trace for plugin "antitk.smx":
L 11/26/2008 - 11:56:05: [SM] [0] Line 468, antitk.sp::(null)()
L 11/26/2008 - 11:56:05: [SM] [1] Line 370, antitk.sp::(null)()

Can you tell me whether you have compiled this plugin yourself?

If so did you modify any of the options in the antitk.sp before compiling?

Which cvars are you running? Thanks.

sLuGo 11-27-2008 14:43

Re: Anti-TK Manager
 
I simply got the .smx from the first page. I've never compiled a plugin before, althou i assume it's fairly easy espically if the tools to do it are included with SM. So no, i didn't mod any options in the .sp

http://i38.tinypic.com/28mcsoy.png

Pretty much i know funcomands beacon and blind work in Insurgency(not alot of things do). So i just want people to have those options to choose from, None of the other options. I want people banned for 60 minutes after they tk'ed 4 times. I think i get those errors when there is a tk, mirror damage works, or the killer is killed by the person he kiills(if they are on the same team) so that works, but nothing is prompting users for punishments or anything.

Rothgar 11-27-2008 19:18

Re: Anti-TK Manager
 
1 Attachment(s)
Hmm I think I see a flaw in my include structure, it seems that since it includes the other file the line numbers are looking wrong...

At least I can't seem to trace down the line number, can you try this version?

Also the Ban time is currently in seconds, so you will need to multiply that number by 60.

Can you also give me an output of "sm version" and maybe try updating SourceMod? I don't see how you are receiving this error even though the lines aren't matching.


All times are GMT -4. The time now is 07:20.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.