LITTLE color help nedded... - 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: LITTLE color help nedded... (
/showthread.php?tid=301970)
LITTLE color help nedded... -
Gooday - 06.12.2011
pawn Код:
public OnPlayerText(playerid, text[])
{
new pname[MAX_PLAYER_NAME], str[128];
GetPlayerName(playerid, pname, sizeof(pname));
strreplace(pname, '_', ' ');
//This will show when player speaks FirstName_LastName says: test
format(str, sizeof(str), "%s: %s", pname, text);
ProxDetector(30.0, playerid, str, COLOR_GREY, COLOR_GREY, COLOR_GREY, COLOR_GREY, COLOR_GREY);
return 0;
}
How i can do this:
FirstName_Lastname(grey): chat text (this white)?
PS: Whats the id of the dark grey? who can give me the "include" of it? +REP...
Re: LITTLE color help nedded... -
Jack_Rocker - 06.12.2011
There is a little tool that I made that lets you select colors from a color picker:
https://sampforum.blast.hk/showthread.php?tid=256906
From this, I got:
There is also this include:
https://sampforum.blast.hk/showthread.php?tid=71259
pawn Код:
public OnPlayerText(playerid, text[])
{
new pname[MAX_PLAYER_NAME], str[128];
GetPlayerName(playerid, pname, sizeof(pname));
strreplace(pname, '_', ' ');
format(str, sizeof(str), "%s: {808080FF} %s", pname, text);
ProxDetector(30.0, playerid, str, COLOR_GREY, COLOR_GREY, COLOR_GREY, COLOR_GREY, COLOR_GREY);//this bit, I aint sure about :L
return 0;
}
All that given, you should have used the search function that is located just in between 'New Posts' and 'Quick Links'.
Jack_Rocker
Re: LITTLE color help nedded... -
[MG]Dimi - 06.12.2011
Look. I don't know how ProxDetector works but here is how I would do that
pawn Код:
public OnPlayerText(playerid, text[])
{
new pname[MAX_PLAYER_NAME], str[128];
GetPlayerName(playerid, pname, sizeof(pname));
strreplace(pname, '_', ' ');//This will show when player speaks FirstName_LastName says: test
format(str, sizeof(str), "%s: {FFFFFF} %s", pname, text);
ProxDetector(30.0, playerid, str, COLOR_GREY, COLOR_GREY, COLOR_GREY, COLOR_GREY, COLOR_GREY);
return 0;
}
You simply use Hex Color codes.
http://www.colorpicker.com/ to get them. They got added in 0.3c (I think xD)