Raised This Month: $51 Target: $400
 12% 

[REQ] L4D TK Kicker


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bman87
Senior Member
Join Date: Dec 2008
Location: Michigan
Old 12-16-2008 , 09:36   [REQ] L4D TK Kicker
Reply With Quote #1

This is a request for a plugin that will kick or ban player if they TK their teammates while waiting in the safe room. Even better would be if players TK their team outside of the saferoom. (Say you get baned/kicked if you incap or kill two teammates within 30 seconds)

I hate people that decide they are going to rage quit. But before they leave, they incap everyone else on their team... I usually ban them afterward so they can't come back, but it would be nice to have a plugin that does this when im not there.
bman87 is offline
ignitor
Member
Join Date: Feb 2007
Location: IL
Old 12-16-2008 , 11:26   Re: [REQ] L4D TK Kicker
Reply With Quote #2

Great request! Although personally, I think it should be based on damage as i have encountered players who wont KILL their team-mates however, they will damage them till they're in the red and let the horde take them down. .
__________________
ignitor is offline
CrimsonGT
Veteran Member
Join Date: Oct 2007
Location: Gainesville, FL
Old 12-16-2008 , 17:19   Re: [REQ] L4D TK Kicker
Reply With Quote #3

I was going to write this a few weeks ago, but had not seen any request for it, so I assumed one of the existing TK plugins for other games was working for Left 4 Dead (although I am pretty sure they have different game events so I wasnt sure how). Anyways, I will write this and release it in the next few days.
__________________
CrimsonGT is offline
bman87
Senior Member
Join Date: Dec 2008
Location: Michigan
Old 12-16-2008 , 17:43   Re: [REQ] L4D TK Kicker
Reply With Quote #4

Quote:
Originally Posted by CrimsonGT View Post
I was going to write this a few weeks ago, but had not seen any request for it, so I assumed one of the existing TK plugins for other games was working for Left 4 Dead (although I am pretty sure they have different game events so I wasnt sure how). Anyways, I will write this and release it in the next few days.
Thanks! I very much appreciate this!
bman87 is offline
msleeper
Veteran Member
Join Date: May 2008
Location: Atlanta, Jawjuh
Old 12-16-2008 , 18:57   Re: [REQ] L4D TK Kicker
Reply With Quote #5

Quote:
Originally Posted by CrimsonGT View Post
I was going to write this a few weeks ago, but had not seen any request for it, so I assumed one of the existing TK plugins for other games was working for Left 4 Dead (although I am pretty sure they have different game events so I wasnt sure how). Anyways, I will write this and release it in the next few days.
FYI, the "guilty" field in the L4D game events is the amount of damage done.
__________________
msleeper is offline
CrimsonGT
Veteran Member
Join Date: Oct 2007
Location: Gainesville, FL
Old 12-16-2008 , 18:59   Re: [REQ] L4D TK Kicker
Reply With Quote #6

Ah nice to know, thank you. I added the first half of the L4D game events to the wiki, and Tsunami did the second half, so I didnt ever see that one. That will make it easy enough.
__________________
CrimsonGT is offline
msleeper
Veteran Member
Join Date: May 2008
Location: Atlanta, Jawjuh
Old 12-16-2008 , 20:32   Re: [REQ] L4D TK Kicker
Reply With Quote #7

Yeah I have been going through each of them more or less in writing the L4D stats. I have run into some problems with player_death not picking up Human Survivors dying, but I may have some bad code. Let me know if you have similar issues, I can maybe point you in the right direction.
__________________
msleeper is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 12-17-2008 , 02:12   Re: [REQ] L4D TK Kicker
Reply With Quote #8

PHP Code:
#pragma semicolon 1

#include <sourcemod>

new bool:preRound;

public 
Plugin:myinfo =
{
    
name "PreRound TK Kicker",
    
author "bl4nk",
    
description "Kicks players who TK while still in the spawn room",
    
version "1.0.0",
    
url "http://forums.alliedmods.net"
};

public 
OnPluginStart()
{
    
HookEvent("player_entered_start_area"RoundStart);
    
HookEvent("player_left_spawn_area"RoundBegin);
    
HookEvent("player_death"PlayerDeath);
}

public 
RoundStart(Handle:event, const String:name[], bool:dontBroadcast)
    
preRound true;
    
public 
RoundBegin(Handle:event, const String:name[], bool:dontBroadcast)
    
preRound false;

public 
PlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
{
    new 
victim GetClientOfUserId(GetEventInt(event"userid"));
    new 
attacker GetClientOfUserId(GetEventInt(event"attacker"));

    if (!
victim || !attacker || !preRound)
        return;

    if (
GetClientTeam(victim) == GetClientTeam(attacker))
    {
        
KickClient(attacker"TKing while in spawn area");
    }

Untested, but should work as intended.
bl4nk is offline
Sammy-ROCK!
Senior Member
Join Date: Jun 2008
Location: Near Mrs.Lag
Old 12-17-2008 , 02:27   Re: [REQ] L4D TK Kicker
Reply With Quote #9

Gj bl4nk. But I think a plugin for such thing should take more time to be developed. There's still the problem of while in round and what if the killer got attacked but killed the guy first? I won't bother making one since CrimsonGT said he'll do it. I still think it should not be kill based but damage based. Otherwise the person can simply shot and let zombies have the kill. Also Crimson remember when your incapacited you have 300hp (Sometimes when I make plugins I forget this).
Sammy-ROCK! is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 12-18-2008 , 01:34   Re: [REQ] L4D TK Kicker
Reply With Quote #10

Ah, I didn't fully understand what the OP was asking for. I thought he only wanted something to kick/ban players that TKd in the safe room.
bl4nk is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:08.


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