#include <amxmodx>
#include <cstrike>
#include <ColorChat>
static const
PLUGIN[ ] = "Ace & Semi-Ace",
VERSION[ ] = "1.0",
AUTHOR[ ] = "Edited by Cr3aTuRa",
TAG[ ] = "[ACE & SEMI-ACE]";
#pragma semicolon 1
#define ACE 5
new g_iFrags[33];
public plugin_init( )
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_event("HLTV", "EventNewRound", "a", "1=0", "2=0");
register_event("DeathMsg", "EventDeathMsg", "a");
register_logevent("LogEventRoundEnd", 2, "1=Round_End");
}
public client_connect(id)
{
g_iFrags[id] = 0;
}
public EventNewRound( )
{
new iPlayers[32], iNum, player;
get_players(iPlayers, iNum, "ch");
for( new i = 0; i < iNum; i++ )
{
player = iPlayers[i];
g_iFrags[player] = 0;
}
}
public EventDeathMsg( )
{
new iKiller = read_data(1);
new iVictim = read_data(2);
CheckAce(iVictim);
if( iKiller == iVictim || !iKiller
|| cs_get_user_team(iKiller) == cs_get_user_team(iVictim) )
{
return PLUGIN_CONTINUE;
}
g_iFrags[iKiller]++;
return PLUGIN_CONTINUE;
}
public LogEventRoundEnd( )
{
new iPlayers[32], iNum, player;
get_players(iPlayers, iNum, "ch");
for( new i = 0; i < iNum; i++ )
{
player = iPlayers[i];
CheckAce(player);
}
}
public CheckAce(id)
{
if( g_iFrags[id] >= ACE -1 )
{
ColorChat(0, GREEN, "%s^x03 %s^x01 a realizat un ^x03%sACE^x01.", TAG, get_name(id), g_iFrags[id] == ACE ? "":"SEMI-");
client_cmd(0, "spk vox/buzwarn");
}
g_iFrags[id] = 0;
}
stock get_name(id)
{
new szName[32];
get_user_name(id, szName, sizeof(szName) -1);
return szName;
}
Download: http://www.girlshare.ro/3489907521.1
Lasă reply dacă ești mulțumit.