Multicolored ClientMessage?
#1

I want to show different colors in a same message.

pawn Код:
CMD:credits(playerid, params[])
{
    SendClientMessage(playerid, COLOR_RED, "Inspiron: 0xFFFFFFAA for scripting,mapping and hosting.");
    SendClientMessage(playerid, COLOR_RED, "YOU: 0xFFFFFFAA for doing something.");
    SendClientMessage(playerid, COLOR_RED, "YOU: 0xFFFFFFAA for doing something.");


    return 1;
}
But this is the result.


What I want to do is something like this
You for doing something for server.

How to do that?
Reply
#2

You need to use raw hexadecimal codes inside brackets ({AAAAAA})

{FFFFFF} would be white, {FF0000} red and so on. Can only be used via scripts or dialogs, Color codes wont get processed if sent via the chat (T, F6).

"{FF0000}You {FFFF00}for doing something for server." is what would be for what you want, specifically. Chat text lenght was increased from 128 to 144 for this reason as color codes are inside the limitation.
Reply
#3

Quote:
Originally Posted by CuervO
Посмотреть сообщение
You need to use raw hexadecimal codes inside brackets ({AAAAAA})

{FFFFFF} would be white, {FF0000} red and so on. Can only be used via scripts or dialogs, Color codes wont get processed if sent via the chat (T, F6).

"{FF0000}You {FFFF00}for doing something for server." is what would be for what you want, specifically. Chat text lenght was increased from 128 to 144 for this reason as color codes are inside the limitation.
I am sorry i cant understand what are you saying.
Can you please provide me the code for it?
Reply
#4

https://sampwiki.blast.hk/wiki/Colors_List#Color_embedding
Reply
#5

Quote:
Originally Posted by hassantariq73
Посмотреть сообщение
I am sorry i cant understand what are you saying.
Can you please provide me the code for it?
^^^
pawn Код:
CMD:credits(playerid, params[])
{
    SendClientMessage(playerid, COLOR_RED, "Inspiron: {FFFFFF} for scripting,mapping and hosting.");
    SendClientMessage(playerid, COLOR_RED, "YOU: {FFFFFF} for doing something.");
    SendClientMessage(playerid, COLOR_RED, "YOU: {FFFFFF} for doing something.");
    return 1;
}
Reply
#6

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
^^^
pawn Код:
CMD:credits(playerid, params[])
{
    SendClientMessage(playerid, COLOR_RED, "Inspiron: {FFFFFF} for scripting,mapping and hosting.");
    SendClientMessage(playerid, COLOR_RED, "YOU: {FFFFFF} for doing something.");
    SendClientMessage(playerid, COLOR_RED, "YOU: {FFFFFF} for doing something.");
    return 1;
}
Thanks, I'll rep you later
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)