Color problem - 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: Color problem (
/showthread.php?tid=602292)
Color problem -
Mister0 - 05.03.2016
Hello I try to define the color of player like that
PHP код:
new Color[4];
stock PlayerColor(factionid)
{
format(Color[1],40,"0xFFFFFFC8");
format(Color[2],40,"0x0080C0C8");
format(Color[3],40,"0x0000A0C8");
return 1;
}
For see if color works I try to make this sendclientmessage, but , don't work is color black when he send me the message, whta is wrong?
PHP код:
format(string,123,"Color: %s ",PlayerColor(PlayerInfo[playerid][pMember]));
SendClientMessage(playerid,PlayerColor(PlayerInfo[playerid][pMember]),string);
Re: Color problem -
Vince - 05.03.2016
Colors are numbers and they should be treated as such. Your function also does nothing but return 1 (0x00000001) a.k.a. black.