Help me about chat
#2

You could try something like:

Код:
public OnPlayerText(playerid, text[])
{
	new string[256], name[MAX_PLAYER_NAME];
	GetPlayerName(playerid, name, sizeof(name));
	if (gTeam[playerid] == TEAM_ATTACK)
	{
	  format(string, sizeof(string), "%s[Attack]: %s", name, text[]);
	  SendClientMessageToAll(COLOR_WHITE, string);
	}
	else if (gTeam[playerid] == TEAM_DEFENCE)
	{
 		format(string, sizeof(string), "%s[Defence]: %s", name, text[]);
 		SendClientMessageToAll(COLOR_WHITE, string);
	}
	return false;
}
Untested.
Reply


Messages In This Thread
Help me about chat - by xCoder - 11.09.2009, 11:18
Re: Help me about chat - by Anwix - 11.09.2009, 11:28
Re: Help me about chat - by xCoder - 11.09.2009, 11:46
Re: Help me about chat - by Abernethy - 11.09.2009, 11:52
Re: Help me about chat - by Correlli - 11.09.2009, 12:05
Re: Help me about chat - by Zeex - 11.09.2009, 12:59
Re: Help me about chat - by saiberfun - 11.09.2009, 13:07
Re: Help me about chat - by Correlli - 11.09.2009, 13:18

Forum Jump:


Users browsing this thread: 1 Guest(s)