Messages for one team only
#1

just 1 simple question:

how to make message, what only shows, for example, to police team?


p.s. why i'm not allowed to use search button?
Reply
#2

pawn Код:
stock SendTeamMessage(teamid,color,message[])
{
  for(new i=0;i<MAX_PLAYERS;i++)
  {
    if(!IsPlayerConnected(i)&&pTeam[i]!=teamid) continue;
    SendClientMessage(i,color,message);
  }
}
And the searching is disabled for everyone.
Reply
#3

Код:
for(new i = 0; i < MAX_PALYERS; i++)
{
if(gTeam[i] == TEAM_POLICE)
{
SendClientMessageToAll(COLOR_BLUE, "If you need help, use \"/help\"");
}
return 1;
}
or do you think:

Код:
forward PoliceMessage(color,const string[]);
public PoliceMessage(color,const string[]) // 
{
	for(new i = 0; i< MAX_PLAYERS; i++)
	{
	  if(IsPlayerConnected(i) == 1) if (gTeam[i] == TEAM_POLICE) SendClientMessage(i, color, string);
	}
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: