SA-MP Forums Archive
change color of chat text? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: change color of chat text? (/showthread.php?tid=232568)



change color of chat text? - BlackWolf120 - 27.02.2011

hi,
just wondering how to change the chat text color and the chat player's name color.
U know, when one team is blue, the players name in the chat is also blue.
How can i change the color? Also of the white chat text?
Saw this on some dm serers.

regards.


Re: change color of chat text? - Krx17 - 27.02.2011

SetPlayerColor(playerid, color)

Example:
pawn Код:
SetPlayerColor(playerid, 0x0000FFAA); //Would make them blue



Re: change color of chat text? - blackwave - 27.02.2011

First, some colors on 0.3c:
pawn Код:
#define red "{FF002B}"
#define pink "{FF00D9}"
#define purple "{DFA7F2}"
#define blue "{A1C2FF}"
#define green "{63F279}"
#define yellow "{FAF623}"
#define black "{69670C}"
#define orange "{F2C80C}"
#define ice "{03F2FF}"
#define lime "{00FF40}"
#define grey "{D4D4D4}"
pawn Код:
public OnPlayerText(playerid, text[])
{
     new string[128];
     if(GetPlayerTeam(playerid) == 1) // Condition
     {
         format(string,sizeof(string),""#lime"(id: %d): "#red"%s",playerid,text); // Colors are like that: "#lime"
         SendPlayerMessageToAll(playerid, string);
         return 0;
     }
     // Any other things
     }



Re: change color of chat text? - BlackWolf120 - 27.02.2011

//edit

ah, didnt see blackwaves answer.
thats what i wanted thx alot