AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   Any good Team Kill protection for CS:S? (https://forums.alliedmods.net/showthread.php?t=190469)

IcEWoLF 07-19-2012 00:26

Any good Team Kill protection for CS:S?
 
Any good up to date plugins for CS:S that work?
Basically when someone TK's someone they will be able to punish kill them, and if they TK enough that they would get banned from the server for a period of time.

Your help is very much appreciated!

TnTSCS 07-19-2012 01:06

Re: Any good Team Kill protection for CS:S?
 
I've used this one: https://forums.alliedmods.net/showthread.php?p=714326, and Rothgar is great at monitoring and replying to the threads for his plugins

IcEWoLF 07-19-2012 01:41

Re: Any good Team Kill protection for CS:S?
 
Thanks! Will give that mod a try!

Hunter S. Thompson 07-19-2012 02:01

Re: Any good Team Kill protection for CS:S?
 
You know, I've looked through your threads and it seems that you're just asking for plugin after plugin. Especially with something that's quite easy to write yourself.

Code:

#pragma semicolon 1

#include <sourcemod>

public OnPluginStart()
{
    HookEvent("player_death", PlayerDeath);
}

public Action:PlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
{
    new client = GetClientOfUserId(GetEventInt(event, "userid"));
    new attacker = GetClientOfUserId(GetEventInt(event, "attacker"));
   
    decl String:attTeam[128], String:userTeam[128];
    GetTeamName(attacker, attTeam, sizeof(attTeam));
    GetTeamName(client, userTeam, sizeof(userTeam));
   
    if (StrEquals(attTeam, userTeam))
    {
        ForcePlayerSuicide(attacker);
    }
}

Of course, other plugins go into a lot more detail, but this is so very simple.

Mitchell 07-19-2012 02:49

Re: Any good Team Kill protection for CS:S?
 
i dont understand, why add more plugins when you could just disable team killing?

ReFlexPoison 07-19-2012 03:47

Re: Any good Team Kill protection for CS:S?
 
Quote:

Originally Posted by Hunter S. Thompson (Post 1753507)
You know, I've looked through your threads and it seems that you're just asking for plugin after plugin. Especially with something that's quite easy to write yourself.

Code:

#pragma semicolon 1

#include <sourcemod>

public OnPluginStart()
{
    HookEvent("player_death", PlayerDeath);
}

public Action:PlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
{
    new client = GetClientOfUserId(GetEventInt(event, "userid"));
    new attacker = GetClientOfUserId(GetEventInt(event, "attacker"));
   
    decl String:attTeam[128], String:userTeam[128];
    GetTeamName(attacker, attTeam, sizeof(attTeam));
    GetTeamName(client, userTeam, sizeof(userTeam));
   
    if (StrEquals(attTeam, userTeam))
    {
        ForcePlayerSuicide(attacker);
    }
}

Of course, other plugins go into a lot more detail, but this is so very simple.

Hell, why not use SDKHooks and block the damage completely then send damage back to the attacker?

Hunter S. Thompson 07-19-2012 15:06

Re: Any good Team Kill protection for CS:S?
 
Quote:

Originally Posted by ReFlexPoison (Post 1753540)
Hell, why not use SDKHooks and block the damage completely then send damage back to the attacker?

I've never really dived into SDKHooks, but yes this is a good idea, essentially mirror damage from TheTwistedPanda's RTD plugin, except resetting/removing the damage done to the player being shot.


All times are GMT -4. The time now is 00:44.

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