hello allied
Code:
#include <amxmodx>
#include <cstrike>
#include <ColorChat>
static const
PLUGIN[ ] = "Ace;Semi-ace Anunt in say",
VERSION[ ] = "1.0",
AUTHOR[ ] = "Rap^",
TAG[ ] = "[TEST]";
#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-");
}
g_iFrags[id] = 0;
}
stock get_name(id)
{
new szName[32];
get_user_name(id, szName, sizeof(szName) -1);
return szName;
}
I would like to add top ace mean, is that an example of top15 when you / you top15 Nick appears motd, Kills, Deaths etc. I wish here if you / topace will be shown as a motd / top15, only to write the name of each player and semi-ace ACE and ACE is made and semi-ace -5 -4, ie 1. Apella - ACE 10 - Semi-Ace - 4, 2. Bot - ACE 15 - Semi-ACE - 4 to up to 10 player in the top and I can restart 0 ie such as a top15