Text color same as player's
#1



pawn Код:
public OnPlayerText(playerid, text[])
    {
         new string[256];
         GetPlayerName(playerid, name, 32);
        format(string,sizeof(string),"%s (%d): %s", name, playerid, text);
        SendClientMessageToAll(GetPlayerColor(playerid), string);
        fwrite(chatlog, string);
    }
As you see when i made it show ID of the Player, and It sends a SendClientMessageToAll with the text color of GetPlayerColor(playerid)
I want this to show the text as white, but the name as the Color above, but i have no idea how.
So i want to show it like

Headucation (0): Hello

Please someone help me with this, And fix my command? I know this is possible.

Thanks in advance
Reply
#2

Search the wiki for SendPlayerMessageToAll
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)