SA-MP Forums Archive
problem with GetPlayerColor - 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: problem with GetPlayerColor (/showthread.php?tid=524360)



problem with GetPlayerColor - Lirbo - 06.07.2014

pawn Код:
public OnPlayerText(playerid, text[])
{
if(Muted{playerid}){return SendClientMessage(playerid,C_RED,"[ERROR] {ff6969}You cannot talk while you muted");}
format(String, sizeof(String), "[%d] {%06x}%s: {FFFFFF}%s",playerid,GetPlayerColor(playerid) >>> 8,GetName(playerid),text);
SendClientMessageToAll(C_HOTPINK,String);
return 0;
}
but its shows it like this in the chat:



Re: problem with GetPlayerColor - Vince - 06.07.2014

https://sampwiki.blast.hk/wiki/GetPlayerColor

Read the Important Note.


Re: problem with GetPlayerColor - Crayder - 06.07.2014

GetPlayerColor doesn't work right unless you use SetPlayerColor, may I suggest setting the players color to whatever you want in OnPlayerConnect?