Help please with chat
#1

This works great,that is not the problem.
If Cops(green) types ;hello the chat windows says [TEAM][TLC]Bob:hello
What i want is for the team chat to be in maroon regardless of what team sends it so it would be:
[TEAM][TLC]Bob:hello


Here is the code:
Код:
public OnPlayerText(playerid, text[])
{
	if(text[0] == ';')
	{
		new string[256],name[24];
		GetPlayerName(playerid,name,24);
		format(string,256,"[TEAM] %s: %s",name,text[1]);
		for(new i = 0; i < MAX_PLAYERS; i++)
		{
			if(IsPlayerConnected(i))
			{
				if(gGroup[i] == gGroup[playerid])
				SendClientMessage(i, GetPlayerColor(playerid), string);
			}
		}
		return 0;
	}
	return 1;
}
Reply
#2

Then change GetPlayerColor to COLOR_YELLOW?

As in:

#define COLOR_YELLOW 0xFFFF00FF
Reply
#3

Quote:
Originally Posted by Weirdosport
Then change GetPlayerColor to COLOR_YELLOW?

As in:

#define COLOR_YELLOW 0xFFFF00FF
Thanx i tried that before but got errors

I changed
Код:
GetPlayerColor(playerid),
to
Код:
COLOR_YELLOW(playierid),
but my problem was i didn;t need the (playerid) after COLOR_YELLOW,so thanx for helping me look further into it.
Reply
#4

pawn Код:
GetPlayerColor(playerid),
to:
pawn Код:
COLOR_YELLOW,
You can't use playerid in color define.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)