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

Best plugin to handle teamkillers?


Post New Thread Reply   
 
Thread Tools Display Modes
sirc86
Junior Member
Join Date: May 2013
Old 05-09-2018 , 13:16   Re: Best plugin to handle teamkillers?
Reply With Quote #11

Quote:
Originally Posted by Obyboby View Post
Just wondering if csgo-tk-punish applies the punishment during the round where the tk occured, or if they are applied at the beginning of the following round? In the latter case, some players could have plenty of time to leave the server and go unpunished. Which sucks.
Damage reflection is really cool, I might try that tonight. I guess it also means that if the team attacker ends up killing the team mate, the same happens to them?
Gotta check if there is a timer in which this action is applied, wouldn't be really cool if someone accidentally killed their team mate at half the round and have to be punished for an obvious mistake, if you know what I mean.
I'll read the source code right now and see if I can figure that out myself
Damage reflection plugin - reflects damage and if he kills you he automatically dies.
Tk-punish - you choose from the menu if you forgive or punish him, the first and only option in punishment is slap 15 damage, if it kills you again you have the following options: slay; bacon; burn; strip weapons, all can be configured from convars.
sirc86 is offline
Markiez
Junior Member
Join Date: Mar 2018
Location: somewhere over the rainb
Old 05-10-2018 , 13:00   Re: Best plugin to handle teamkillers?
Reply With Quote #12

Quote:
Originally Posted by Addicted. View Post
why are you adding victim + attacker?
if they are in the same team, but I thought wrong
__________________
bool am_I_retarded = true;
Markiez is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 05-11-2018 , 05:46   Re: Best plugin to handle teamkillers?
Reply With Quote #13

@Markiez

Don't use ServerCommand() to call "sm_ban" but rather use BanClient() to directly call the ban function.

PHP Code:
#include <sourcemod>
#include <cstrike>
#pragma semicolon 1
#pragma newdecls required

public void OnPluginStart() 
{
    
HookEvent("player_death"Event_PlayerDeath);
}

public 
Action Event_PlayerDeath(Event event, const char[] namebool dontBroadcast)
{
    
int victim GetClientOfUserId(event.GetInt("userid"));
    
int attacker GetClientOfUserId(event.GetInt("attacker"));
    if (
IsValidClient(victim) && IsValidClient(attacker) && GetClientTeam(victim) == GetClientTeam(attacker) && victim != attacker)
    {
        
BanClient(attacker30BANFLAG_AUTO"Banned for teamkilling""You have been banned for teamkilling"""attacker);
    }
}

stock bool IsValidClient(int client)
{
    return (
client && client <= MaxClients && IsClientInGame(client) && !IsClientInKickQueue(client) && !IsFakeClient(client));

@ThatOneGuy

You don't need SDKHooks to hook player events. HookEvent() isn't a SDKHooks function.
__________________

Last edited by Psyk0tik; 05-11-2018 at 05:52.
Psyk0tik 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 07:29.


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