SA-MP Forums Archive
Help Color Chat - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help Color Chat (/showthread.php?tid=183050)



Help Color Chat - eixas10000 - 13.10.2010

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.


Re: Help Color Chat - Mauzen - 13.10.2010

Isnt it like this by default?

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


Re: Help Color Chat - iggy1 - 13.10.2010

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;
}



Re: Help Color Chat - Rizard - 13.10.2010

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.