Code:
public Event_TeamScore()
{
new szTeam[2];
read_argv(1, szTeam, charsmax(szTeam));
if (szTeam[0] == 'T')
{
g_iTsScore = read_data(2);
}
else
{
g_iCTsScore = read_data(2);
}
if(g_iCTsScore == 8)
{
match_over(1);
}
else if (g_iTsScore == 8)
{
match_over(2);
}
return PLUGIN_HANDLED
}
match_over(num)
{
new szName[32]
get_user_name(g_qid[num],szName,31) //g_qid[1] = ct player id, g_qid[2] = t player id
client_print(0,print_chat,"%s has won !!", szName)
client_print(0,print_chat,"%s has won !!", szName)
}
When I was testing this, I was in T and even when CT player won 8 rounds, the printing showed "<my nick> has won !!"