Team Chat
#7

Quote:
Originally Posted by vassilis
Посмотреть сообщение
this is what i am using for team chat:
it will work surely :

pawn Код:
new string[256];
  new playername[MAX_PLAYER_NAME];
  if(text[0] == '!' && text[1] != 0)
  {
    GetPlayerName( playerid, playername, MAX_PLAYER_NAME );
    format( string, 128, "[Team-Chat] %s: %s", playername, text[1] );
    for(new i = 0; i < MAX_PLAYERS; i++ )
    {
      if( IsPlayerConnected(i) && gTeam[playerid] == gTeam[i] )
        SendClientMessage( i, COLOR_YELLOW, string );
    }
    return 0;
    }
Idk why I used SendPlayerMessageToPlayer(), thanks for fixing it.
Reply


Messages In This Thread
Team Chat - by SpiderWalk - 18.02.2012, 22:10
Re: Team Chat - by Nonameman - 18.02.2012, 23:11
Re: Team Chat - by SpiderWalk - 19.02.2012, 08:06
Re: Team Chat - by vassilis - 19.02.2012, 08:27
Re: Team Chat - by SpiderWalk - 19.02.2012, 08:33
Re: Team Chat - by vassilis - 19.02.2012, 08:40
Re: Team Chat - by Nonameman - 19.02.2012, 12:00

Forum Jump:


Users browsing this thread: 3 Guest(s)