Quote:
Originally Posted by Obyboby
mp_tkpunish
Will punish the offender at the beginning of the following round. I need immediate action
|
Code:
#include <sourcemod>
#include <cstrike>
#pragma semicolon 1
public void OnPluginStart()
{
HookEvent("player_death", Event_PlayerDeath);
}
public Action Event_PlayerDeath(Event event, const char[] name, bool dbc)
{
int victim = GetClientOfUserId(GetEventInt(event, "userid"));
int attacker = GetClientOfUserId(GetEventInt(event, "attacker"));
new client = victim + attacker;
if (GetClientTeam(client) == CS_TEAM_CT)
{
ServerCommand("sm_ban %d 30", attacker);
}
else if (GetClientTeam(client) == CS_TEAM_T)
{
ServerCommand("sm_ban %d 30", attacker);
}
}
I dunno bro, I'm not that knowledgeable, try this though.