SA-MP Forums Archive
How do i Make the Chat White - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How do i Make the Chat White (/showthread.php?tid=429095)



How do i Make the Chat White - Murderface - 08.04.2013

Hello, I'm trying to make my Text chat white, but i'm having troubles, does anyone know how to fix this?


Re: How do i Make the Chat White - Vlad64 - 08.04.2013

Like this?
pawn Код:
public OnPlayerText(playerid, text[])
{
    new playername[MAX_PLAYER_NAME],message[128];
    GetPlayerName(playerid,playername,sizeof(playername));
    format(message,sizeof(message),"%s: %s",playername,text);
    SendClientMessageToAll(0xFFFFFFAA,message);
    return 0;
}



Re: How do i Make the Chat White - Murderface - 08.04.2013

Quote:
Originally Posted by Vlad64
Посмотреть сообщение
Like this?
pawn Код:
public OnPlayerText(playerid, text[])
{
    new playername[MAX_PLAYER_NAME],message[128];
    GetPlayerName(playerid,playername,sizeof(playername));
    format(message,sizeof(message),"%s: %s",playername,text);
    SendClientMessageToAll(0xFFFFFFAA,message);
    return 0;
}
Does this work if it has some gang stuff in the script?


Mine looks like this if(text[0] == '!') {
new gangChat[128];
new senderName[MAX_PLAYER_NAME];
new string[128];
strmid(gangChat,text,1,strlen(text));
GetPlayerName(playerid, senderName, sizeof(senderName));
format(string, sizeof(string),"%s: %s", senderName, gangChat);
for(new i = 0; i < MAX_PLAYERS; i++) {
if(PlayerInfo[i][team] == PlayerInfo[playerid][team]) {
SendClientMessage(i, COLOR_YELLOW, string);


Re: How do i Make the Chat White - Windrush - 08.04.2013

change this
SendClientMessage(i, COLOR_YELLOW, string);
to this
SendClientMessage(i, 0xFFFFFFFF, string);


Re: How do i Make the Chat White - Murderface - 08.04.2013

Quote:
Originally Posted by Windrush
Посмотреть сообщение
change this
SendClientMessage(i, COLOR_YELLOW, string);
to this
SendClientMessage(i, 0xFFFFFFFF, string);
Nope, i did that and it did nothing, my Name is Green and my text is Red


Re: How do i Make the Chat White - Konstantinos - 08.04.2013

SendClientMessage returns the name and the colour of the player and the rest of the text is in white colour.


Re: How do i Make the Chat White - Murderface - 08.04.2013

Quote:
Originally Posted by Dwane
Посмотреть сообщение
SendClientMessage returns the name and the colour of the player and the rest of the text is in white colour.
Hmm, sadly none of the text on the screen at all was white, it was either Red, blue or green


Re: How do i Make the Chat White - iggy1 - 08.04.2013

Here's an example to get it to work with your other code (hopefully).

pawn Код:
public OnPlayerText(playerid, text[])
{
    if( text[0] == '!' )
    {
        //send message to team
        return 0;//return 0 so the original message isn't sent
    }
    else if( text[0] == '#' )
    {
        //send message to team/vip whatever
        return 0;
    }
    else //it's a normal message
    {
        //pasted from above
        new playername[MAX_PLAYER_NAME],message[128];
        GetPlayerName(playerid,playername,sizeof(playername));
        format(message,sizeof(message),"%s: %s",playername,text);
        SendClientMessageToAll(0xFFFFFFAA,message);
    }
    return 0;//return 0 so the original message isn't sent
}



Re: How do i Make the Chat White - 15outland - 08.04.2013

nevermind fix my problem