LITTLE color help nedded...
#1

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...
Reply
#2

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:
Код:
0x808080FF
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
Reply
#3

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)
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)