Problem With Chat
#8

Remember OnPlayerText always returns true to be able to chat. So the code should be:

pawn Код:
public OnPlayerText(playerid, text[])
{
    // Rest of the code
    return 1;
}
So maybe try this
pawn Код:
//
if(text[0] == '!')
    {
      new name[24], string[256];
      GetPlayerName(playerid, name, 24);
      format(string, sizeof(string), "{AD855C}[Team Chat]%s: %s", name, text[1]);

      for(new i = 0; i < MAX_PLAYERS; i++)
       {
        if(IsPlayerConnected(i))
        {
        if(GetPlayerTeam(playerid) == GetPlayerTeam(i))
        SendClientMessage(i,yellow, string);
        }
      }
    }
    return 1;
Reply


Messages In This Thread
Problem With Chat - by V_LOPE - 15.12.2011, 05:56
Re: Problem With Chat - by Celson - 15.12.2011, 05:59
Re: Problem With Chat - by V_LOPE - 15.12.2011, 06:00
Re: Problem With Chat - by [ABK]Antonio - 15.12.2011, 06:03
Re: Problem With Chat - by V_LOPE - 15.12.2011, 06:08
Re: Problem With Chat - by Rob_Maate - 15.12.2011, 06:29
Re: Problem With Chat - by [ABK]Antonio - 15.12.2011, 06:35
Re: Problem With Chat - by suhrab_mujeeb - 15.12.2011, 06:38
Re: Problem With Chat - by Rob_Maate - 15.12.2011, 06:42
Re: Problem With Chat - by [ABK]Antonio - 15.12.2011, 06:44

Forum Jump:


Users browsing this thread: 1 Guest(s)