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=378234)
Problem with GetPlayerColor -
blackfire49 - 16.09.2012
Hey i have a little problem i want to set the string Color to the Color from the Player but if i say SendClientMessage(playerid,GetPlayerColor(playerid ),string)
The String is Black i don't understand why.
Ps: Sorry for my English i can't speak or write well in english
Re: Problem with GetPlayerColor -
Roko_foko - 16.09.2012
https://sampwiki.blast.hk/wiki/GetPlayerColor
Check the note. Have you used SetPlayerColor before using GetPlayerColor. If not, there is solution.
AW: Problem with GetPlayerColor -
blackfire49 - 16.09.2012
I have this Code from the Wiki in my Script but it is black and no i dont Use SetPlayerColor
Here The Part of my Script where i need to set the string color
pawn Код:
if(ChatChannel[pID] == 1)
{
if(ChatChannel[pID] == ChatChannel[playerid])
{
new Float:Chat_RadiusX,Float:Chat_RadiusY,Float:Chat_RadiusZ;
format(string,sizeof(string),"%s: {FFFFFF}%s",name,text);
GetPlayerPos(pID,Chat_RadiusX,Chat_RadiusY,Chat_RadiusZ);
if(IsPlayerInRangeOfPoint(pID,7.0,Chat_RadiusX,Chat_RadiusY,Chat_RadiusZ))
{
SendClientMessage(pID,GetPlayerColor(playerid),string);
}
}
}
Re: Problem with GetPlayerColor -
Roko_foko - 16.09.2012
You need to set player colors OnPlayerConnect. If you want to set default colors check this tutorial:
https://sampwiki.blast.hk/wiki/ColorFix
AW: Problem with GetPlayerColor -
blackfire49 - 16.09.2012
Thanks it works ^^ didn't know that i need to set the Color First
Re: Problem with GetPlayerColor -
clarencecuzz - 17.09.2012
Or alternatively, you can always use SendPlayerMessageToAll.
https://sampwiki.blast.hk/wiki/SendPlayerMessageToAll