[Help]2 colours in a ClientMessage?
#1

Hi, im wondering can you get two colours into a Clientmessage/ format
prob a newb question but meh

like this
pawn Код:
new test[MAX_PLAYERS];

public OnPlayerText(playerid, text[])
{
    if(test[playerid] == 1)
    {
    new string[128];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(string, sizeof(string), "%s[Test]: %s", name, text); //Players name to be a colour, and the text to be default white
    SendClientMessageToAll(dunno,string);
    return 0;
    }
    return 1;
}
Hope this made sense

Thanks
Reply
#2

if your trying to set the players name color, just use

Код:
SetPlayerColor(playerid,color);
Reply
#3

What you are trying to do is not possible. The only way to put 2 colors in a SendClientMessage, is to use SendPlayerMessageToAll or SendPlayerMessageToPlayer.
Reply
#4

Quote:
Originally Posted by Blacklite
What you are trying to do is not possible. The only way to put 2 colors in a SendClientMessage, is to use SendPlayerMessageToAll or SendPlayerMessageToPlayer.
aeeehh?

How would i do that, with SendPlayerMessageToAll??
Reply
#5

You can only use 1 color in a SCM, use textdraws.
Reply
#6

Use Sandra's "second chatbox" - it works with textdraws ... you can use ~r~,~b~... codes to change colour
http://forum.sa-mp.com/index.php?topic=49741.0
Reply
#7

There is a way, i have the code somewhere.
If i find it, i'll post.
Reply
#8

Quote:
Originally Posted by Kurence
Use Sandra's "second chatbox" - it works with textdraws ... you can use ~r~,~b~... codes to change colour
http://forum.sa-mp.com/index.php?topic=49741.0
Thanks for that but i dont want to use textdraws

@Abernethy♥ oooo cool thanks
Reply
#9

https://sampwiki.blast.hk/wiki/SendPlayerMessageToAll
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)