29.07.2010, 11:32
Better version, you can specify the team in this, as well as the color:
Just use it like a normal SendClientMessage, but replace 'playerid', with the teamid the message has to be sent to.
pawn Код:
forward SendTeamMessage(teamid, color, const message[]);
public SendTeamMessage(teamid, color, const message[])
{
for(new i; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i)) continue;
if(GetPlayerTeam(i) != teamid) continue;
SendClientMessage(i, color, message);
}
return 1;
}