need help with chat color
#2

pawn Код:
#define white "{FFFFFF}" //at the top of script after #include

//OnPlayerText

new string[128], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "(%d) %s: "white"%s", playerid, pname, text); //(%d) will be the playerid, %s will be the players name, "white"%s should be the player typed message text
SendClientMessageToAll(GetPlayerColor(playerid), string); //will sent message to everyone with players color
if you didn't SetPlayerColor, the players color will be color black when sent chat.

and almost forgot set the OnPlayerText return 1; to return 0;
Reply


Messages In This Thread
need help with chat color - by YossiBz - 03.04.2012, 10:46
Re: need help with chat color - by Reklez - 03.04.2012, 10:50
Re: need help with chat color - by YossiBz - 03.04.2012, 10:57
Re: need help with chat color - by Reklez - 03.04.2012, 10:59
Re: need help with chat color - by YossiBz - 03.04.2012, 11:13
Re: need help with chat color - by sjvt - 03.04.2012, 11:20
Re: need help with chat color - by Jonny5 - 03.04.2012, 12:27
Re: need help with chat color - by sjvt - 03.04.2012, 12:29
Re: need help with chat color - by MrEnd - 03.04.2012, 15:00

Forum Jump:


Users browsing this thread: 1 Guest(s)