08.08.2013, 22:16
This is pretty simple really, hopefully this should work!
pawn Код:
enum pInfo
{
pTeam
}
stock SendTeamMessage(teamid, message[]) // This is a stock function, it pretty much allows you to use "SendTeamMessage(teamid, message[])"
{
for(new i = 0; i < MAX_PLAYERS; i++) // This is a loop it loops through the total players that your server would allow.
{
if(IsPlayerConnected(i) && PlayerInfo[i][pTeam] == teamid) // This checks if the player is connected and if there team matches the teamid.
{
SendClientMessage(i, 0xFFFFFFFF, message); // This will send the message to the team.
}
}
return 1;
}