How do I add color to these messages? - 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)
+--- Thread: How do I add color to these messages? (
/showthread.php?tid=457573)
How do I add color to these messages? -
NinjahZ - 12.08.2013
I have team chat in my script but how do I make it so they are colored?
pawn Код:
public OnPlayerText(playerid,text[])
{
new string[124],name[24];
GetPlayerName(playerid,name,sizeof(name));
switch(gTeam[playerid])
{
case 0:
{
format(string,sizeof(string)"[Blue Team Chat] %s: %s",name,text);//I want color here for "Blue Team Chat"
SendTeamMessage(0,string);
}
case 1:
{
format(string,sizeof(string)"[Red Team Chat] %s: %s",name,text);//I want color here for "Red Team Chat"
SendTeamMessage(1,string);
}
}
return 0;
}
Re: How do I add color to these messages? -
ThePhenix - 12.08.2013
Color Embedding
PHP код:
public OnPlayerText(playerid,text[])
{
new string[124],name[24];
GetPlayerName(playerid,name,sizeof(name));
switch(gTeam[playerid])
{
case 0:
{
format(string,sizeof(string)"{0000FF}[Blue Team Chat]%s: {FFFFFF}%s",name,text);//I want color here for "Blue Team Chat"
SendTeamMessage(0,string);
}
case 1:
{
format(string,sizeof(string)"{FF0000}[Red Team Chat] %s: {FFFFFF}%s",name,text);//I want color here for "Red Team Chat"
SendTeamMessage(1,string);
}
}
return 0;
}
Re: How do I add color to these messages? -
[XST]O_x - 12.08.2013
https://sampwiki.blast.hk/wiki/Colors#Color_embedding