Help Color Chat
#1

How to..

If player color name is green.

When send message color green.

If player color name is red.

When send message color red.


Sorry I'm English not good.
Reply
#2

Isnt it like this by default?

else: SendClientMessage(player, GetPlayerColor(sender), message[]);
Reply
#3

If you mean like the /me command try this,
pawn Код:
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;
}
Reply
#4

haven't search, but I can't believe it wasn't requested yet! so search next time!?


GetPlayerColor doesn't work if you don't set player colors

SO FIRST GO HERE: https://sampwiki.blast.hk/wiki/ColorFix DO THAT

THEN

pawn Код:
public OnPlayerText(playerid, text[])
{
    SendClientMessage(playerid,GetPlayerColor(playerid),text[]);
}
I wanted to delete (can't find delete buttonz XD) this since there has been posted massively since I started posting and maybe the fix doesn't need 2.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)