cops and agents team chat ??
#3

Код:
public OnPlayerText(playerid, text[])
{
  new string[256];
  new playername[MAX_PLAYER_NAME];
  if(text[0] == '!' && text[1] != 0)
  {
    GetPlayerName( playerid, playername, MAX_PLAYER_NAME );
    format( string, 128, "[Team] %s: %s", playername, text[1] );
    for(new i = 0; i < MAX_PLAYERS; i++ )
    {
      if( IsPlayerConnected(i) && gTeam[playerid] == gTeam[i] )
        SendClientMessage( i, YOUR_COLOR, string );
    }
    return 0;
  }

  return 1;
}
This only works if you have
Код:
static gTeam[MAX_PLAYERS];
You can change "!" to your desired command for team chat.
Reply


Messages In This Thread
cops and agents team chat ?? - by RobShakur - 25.01.2010, 05:21
Re: cops and agents team chat ?? - by mansonh - 25.01.2010, 05:45
Re: cops and agents team chat ?? - by [dN]Eagle - 25.01.2010, 12:42

Forum Jump:


Users browsing this thread: 2 Guest(s)