OnPlayerText not getting player color.
#5

Quote:
Originally Posted by BigETI
Посмотреть сообщение
You have to use the color of the player to show the correct color.
pawn Код:
public OnPlayerText(playerid, text[])
{
    new message[128], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, MAX_PLAYER_NAME);
    format(message, sizeof message, "%s(%d): {FFFFFF}%s", name, playerid, text);
    SendClientMessageToAll(GetPlayerColor(playerid), message);
    return 0;
}
Ok i'll try it.


haha i was trying like this lol
pawn Код:
public OnPlayerText(playerid, text[])
{
    new message[128], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, MAX_PLAYER_NAME);
        GetPlayerColor(playerid);
    format(message, sizeof message, "%s(%d): {FFFFFF}%s", name, playerid, text);
    SendClientMessageToAll(playerid, message);
    return 0;
}
EDIT: YES! it works perfectly thanks
but it sets the player color to black. is there a way to make it random. because everyone will be black in the server lol
Reply


Messages In This Thread
OnPlayerText not getting player color. - by RiChArD_A - 25.06.2013, 17:07
Re: OnPlayerText not getting player color. - by KingHual - 25.06.2013, 17:12
AW: OnPlayerText not getting player color. - by BigETI - 25.06.2013, 17:22
Re: OnPlayerText not getting player color. - by dEcooR - 25.06.2013, 17:22
Re: AW: OnPlayerText not getting player color. - by RiChArD_A - 25.06.2013, 17:28
Re: OnPlayerText not getting player color. - by [jS]Thomas - 25.06.2013, 17:32
Re: OnPlayerText not getting player color. - by Vince - 25.06.2013, 19:09
AW: OnPlayerText not getting player color. - by BigETI - 25.06.2013, 19:51
Re: OnPlayerText not getting player color. - by RiChArD_A - 26.06.2013, 00:31

Forum Jump:


Users browsing this thread: 2 Guest(s)