[UNSOLVED]team chat isn't working
#7

If you have
Код:
static gTeam[MAX_PLAYERS];
Then use this :
Код:
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, YourColor, string );
    }
    return 0;
  }

  return 1;
}
That should work.
Reply


Messages In This Thread
[UNSOLVED]team chat isn't working - by `FuTuRe- - 23.01.2010, 15:54
Re: team chat isn't working - by `FuTuRe- - 23.01.2010, 16:38
Re: [UNSOLVED]team chat isn't working - by DeathOnaStick - 23.01.2010, 16:42
Re: [UNSOLVED]team chat isn't working - by dice7 - 23.01.2010, 16:46
Re: [UNSOLVED]team chat isn't working - by bajskorv123 - 23.01.2010, 17:12
Re: [UNSOLVED]team chat isn't working - by `FuTuRe- - 23.01.2010, 17:16
Re: [UNSOLVED]team chat isn't working - by [dN]Eagle - 23.01.2010, 18:23

Forum Jump:


Users browsing this thread: 3 Guest(s)