How do i Make the Chat White
#1

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

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;
}
Reply
#3

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);
Reply
#4

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

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
Reply
#6

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

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
Reply
#8

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
}
Reply
#9

nevermind fix my problem
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)