problem with coloring the chat
#1

We are trying to put a default chat color different than white but we came across a problem that we can't solve. Every time a player writes 2 rows, the color of the second row remains white. Can some one help me, please
Reply
#2

We need your code.
Reply
#3

If you're using something similar to this...

pawn Code:
new PlayerName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
    format(text, 1024, "%s (%d): {FFFFFF}%s", PlayerName, playerid, text);
    SendClientMessageToAll(GetPlayerColor(playerid), text);
...Then try replacing the {FFFFFF} with your own colour.
Reply
#4

I'd suggest not allowing two rows of text.
Simple fix to this problem.
Reply
#5

I'll Discuss this with my mate, see if we use something similar.
Reply
#6

we use something like this:

Code:
new MMM[256];
format(MMM, sizeof(MMM),"(ID:%i): %s", playerid, text);
SendPlayerMessageToAll(playerid, MMM);
We need to make a new line if there are more than 55 characters. something like "/n", i don't know...
Reply
#7

This will allow the second row to be colored?
Reply
#8

Code:
public OnPlayerText(playerid, text[])
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, MAX_PLAYER_NAME);
    format(text,128,"(%d)%s: %s",playerid, name, text);
    SendClientMessageToAll(GetPlayerColor(playerid),text);
    return 0;
}
this should help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)