Use this.
Kills counter and rebels will be reset.
(Untested):
PHP Code:
#include <amxmodx>
new g_iTKills[33], g_iMaxPlayers;
new bool:g_bRebel[33];
public plugin_init()
{
register_event("DeathMsg", "ev_Death", "a");
register_event("Damage", "ev_Damage", "b");
register_event("HLTV", "ev_newRound", "a", "1=0", "2=0");
g_iMaxPlayers = get_maxplayers();
}
public ev_Death()
{
static iVic ; iVic = read_data(2);
static iAtt ; iAtt = read_data(1);
if(!(1 <= iAtt <= g_iMaxPlayers)
|| !(1 <= iVic <= g_iMaxPlayers))
{
return PLUGIN_CONTINUE;
}
static aName[32], vName[32];
if(get_user_team(iAtt) == 2)
{
get_user_name(iAtt, aName, charsmax(aName));
if(get_user_team(iVic) == 1 && ++g_iTKills[iAtt] > 2)
{
user_silentkill(iAtt);
client_print(0, print_chat, "[Rebel] CT Player ^"%s^" was slayed after killing more than 2 terrorists", aName);
g_iTKills[iAtt] = 0;
}
}
if(g_bRebel[iVic])
{
if(aName[0])
{
get_user_name(iVic, vName, charsmax(vName));
client_print(0, print_chat, "[Rebel] CT Player ^"%s^" killed rebel ^"%s^"", aName, vName);
}
g_bRebel[iVic] = false;
}
return PLUGIN_CONTINUE;
}
public ev_Damage(iVic)
{
static iAtt ; iAtt = get_user_attacker(iVic);
if(!(1 <= iAtt <= g_iMaxPlayers))
{
return PLUGIN_CONTINUE;
}
static TName[32];
if(get_user_team(iVic) == 2 && get_user_team(iAtt) == 1)
{
if(!g_bRebel[iAtt])
{
get_user_name(iAtt, TName, charsmax(TName));
client_print(0, print_chat, "[Rebel] T Player ^"%s^" is a rebel!");
g_bRebel[iAtt] = true;
}
}
return PLUGIN_CONTINUE;
}
public ev_newRound()
{
for(new i = 1 ; i <= g_iMaxPlayers ; i++)
{
g_bRebel[i] = false;
g_iTKills[i] = 0;
}
}
public client_disconnect(id)
{
g_bRebel[id] = false;
g_iTKills[id] = 0;
}
__________________