Chat color
#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), "{0xAFAFAFAA}%s{0xAFAFAFAA}: %s", pname, text);
    ProxDetector(30.0, playerid, str, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
    return 0;
}
I added the codes for the color but the chat still be white and i see the numbers, i would have the NAME clored and the text white
Reply
#2

remove the 0x from the color codes
Reply
#3

pawn Код:
#define COLOR_1 "{0xAFAFAFAA}"
#define COLOR_2 "{0xAFAFAFAA}"

format(str, sizeof(str), ""COLOR_1"%s"COLOR_2": %s", pname, text);
this is more neater

Do what the person says above
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)