Team Chat help +Rep
#2

Try this one:

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

	return 1;
}
Use # [Text] for team chat.
Reply


Messages In This Thread
Team Chat help +Rep - by Dustly - 11.01.2012, 13:57
Re: Team Chat help +Rep - by Min - 11.01.2012, 14:03
Re: Team Chat help +Rep - by Dustly - 11.01.2012, 14:22
Re: Team Chat help +Rep - by KingHual - 11.01.2012, 14:36
Re: Team Chat help +Rep - by Dustly - 12.01.2012, 01:43
Re: Team Chat help +Rep - by Psymetrix - 12.01.2012, 01:45

Forum Jump:


Users browsing this thread: 1 Guest(s)