ok got it working respawning the team attacker but, does your current plugin respawn the player that the TK attacked?
Code:
/*
Blizzards Plugins Comply With GNU General Public License
TK Punish is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Under no circumstances are you allowed to redistribute and/or modify
it claming that you are the original author of such plugin/modification.
TK Punish is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include < amxmodx >
#include < amxmisc >
#include < fun >
#include < cstrike >
#include < hamsandwich >
#pragma semicolon 1
#define PLUGIN "TK Punish"
#define VERSION "1.0"
#define AUTHOR "Blizzard"
#define TASK_COUNTDOWN 123456
new g_iTkCount[ 33 ];
new g_iTkTotal;
new g_iTimer;
new REVIVE_TIME;
new g_sSlay[] = { "bo/slay" };
new g_sKick[] = { "bo/kick" };
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_event( "DeathMsg", "Event_DeathMsg", "a" );
g_iTkTotal = register_cvar( "amx_tk_total", "3" );
REVIVE_TIME = register_cvar( "amx_tk_revivetime", "10" );
}
public plugin_precache()
{
precache_sound( g_sKick );
precache_sound( g_sSlay );
}
public client_connect( id ) g_iTkCount[ id ] = 0;
public Event_DeathMsg()
{
new iKiller = read_data( 1 );
new iVictim = read_data( 2 );
new TkTotal = get_pcvar_num( g_iTkTotal );
if( iVictim != iKiller )
{
if( cs_get_user_team( iKiller ) == cs_get_user_team( iVictim ) )
{
if( g_iTkCount[ iKiller ] > TkTotal )
{
set_task( 5.0, "KickTKiller", iKiller );
client_cmd( 0, "spk %s", g_sKick );
}
else {
user_silentkill( iKiller );
g_iTimer = ( get_pcvar_num( REVIVE_TIME ) + 1 );
ReviveCountdown( iKiller );
client_cmd( 0, "spk %s", g_sSlay );
g_iTkCount[ iKiller ]++;
}
}
}
}
public ReviveCountdown(id)
{
--g_iTimer;
set_hudmessage(random(256), random(256), random(256), -1.0,-1.0, 1, 6.0, 1.0, 0.0, 0.0);
if( g_iTimer == 0 )
{
show_hudmessage( id, "FIGHT!!!");
ExecuteHamB( Ham_CS_RoundRespawn, id );
remove_task(TASK_COUNTDOWN);
g_iTimer = ( get_pcvar_num( REVIVE_TIME ) + 1 );
return;
}
show_hudmessage( id, "Respawn In %i Second(s)", g_iTimer);
set_task(1.0, "ReviveCountdown", id);
}
public KickTKiller( id )
{
server_cmd( "kick #%i ^"You Killed To Many Players On Your Team!^"", get_user_userid(id) );
}
try this out... it respawns team killer after 10 secs