PHP Code:
#include <amxmodx>
#include <cshack>
#pragma semicolon 1
#define TERO 1
#define CT 2
#define MAX_ROUNDS 59
static const
PLUGIN[ ] = "Lead Team",
VERSION[ ] = "0.0.1",
AUTHOR[ ] = "Rap^^";
new const g_szSounds[7][ ] =
{
"terro.wav",
"counter.wav",
"conduce_cu.wav",
"la.wav",
"este.wav",
"egalitate.wav",
"gol1.wav" //(s47)
};
public plugin_init( )
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_logevent("LogEventRoundEnd", 2, "1=Round_End");
}
public plugin_precache( )
{
new szNumber[32];
for( new i = 0; i < MAX_ROUNDS; i++ )
{
num_to_word(i, szNumber, charsmax(szNumber));
format(szNumber, charsmax(szNumber), "%s.wav", szNumber);
precache_sound(szNumber);
}
for( new i = 0; i < sizeof(g_szSounds); i++ )
{
precache_sound(g_szSounds[i]);
}
}
public LogEventRoundEnd( )
{
new iTeroScore = cs_get_team_score(TERO);
new iCTScore = cs_get_team_score(CT);
if( iTeroScore <= MAX_ROUNDS && iCTScore <= MAX_ROUNDS )
{
new szTeroScore[32];
new szCTScore[32];
new szSound[96];
num_to_word(iTeroScore, szTeroScore, charsmax(szTeroScore));
num_to_word(iCTScore, szCTScore, charsmax(szCTScore));
if( iTeroScore > iCTScore )
{
formatex(szSound, charsmax(szSound), "spk ^"terro conduce_cu %s la gol1(s47) %s^"", szTeroScore, szCTScore);
engclient_cmd(0, szSound);
}
else if( iTeroScore < iCTScore )
{
formatex(szSound, charsmax(szSound), "spk ^"counter conduce_cu %s la gol1(s47) %s^"", szCTScore, szTeroScore);
engclient_cmd(0, szSound);
}
else
{
formatex(szSound, charsmax(szSound), "spk ^"este egalitate %s la gol1(s47) %s^"", szTeroScore, szCTScore);
engclient_cmd(0, szSound);
}
}
}
Try this.