SA-MP Forums Archive
Problem with name color thing, - 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: Problem with name color thing, (/showthread.php?tid=92223)



Problem with name color thing, - guaid - 19.08.2009

Hello, Thanks for reading, So, i cant figure out how to change to color of a players name,
It goes like this
pawn Код:
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1) // 1-16
{
     SetPlayerToTeamColor(playerid);
And its here im getting unsure how to put it in,


Re: Problem with name color thing, - Correlli - 19.08.2009

I guess SetPlayerToTeamColor function (custom made function) will just set player's color to team color.
https://sampwiki.blast.hk/wiki/SetPlayerColor


Re: Problem with name color thing, - guaid - 19.08.2009

Thanks, And yes its custom, i was just unsure on how to do it so i hoped for a response


Re: Problem with name color thing, - Calgon - 19.08.2009

You'll want to get the RGB colour and use SetPlayerColor().

Here's a quick example, even though the wiki explains it in better context:

pawn Код:
if(PlayerInfo[playerid][pLeader] == 1)
{
SetPlayerColor(playerid, 255255255); // PD Chief gets color white.
}



Re: Problem with name color thing, - guaid - 19.08.2009

Quote:
Originally Posted by Calgon
You'll want to get the RGB colour and use SetPlayerColor().

Here's a quick example, even though the wiki explains it in better context:

pawn Код:
if(PlayerInfo[playerid][pLeader] == 1)
{
SetPlayerColor(playerid, 255255255); // PD Chief gets color white.
}
Okay.. But cant see a reason for changin leader to white,


Re: Problem with name color thing, - Calgon - 19.08.2009

Quote:
Originally Posted by guaid
Quote:
Originally Posted by Calgon
You'll want to get the RGB colour and use SetPlayerColor().

Here's a quick example, even though the wiki explains it in better context:

pawn Код:
if(PlayerInfo[playerid][pLeader] == 1)
{
SetPlayerColor(playerid, 255255255); // PD Chief gets color white.
}
Okay.. But cant see a reason for changin leader to white,
It was an example. You can find other RGB colour values by searching ******.


Re: Problem with name color thing, - guaid - 19.08.2009

Quote:
Originally Posted by Calgon
Quote:
Originally Posted by guaid
Quote:
Originally Posted by Calgon
You'll want to get the RGB colour and use SetPlayerColor().

Here's a quick example, even though the wiki explains it in better context:

pawn Код:
if(PlayerInfo[playerid][pLeader] == 1)
{
SetPlayerColor(playerid, 255255255); // PD Chief gets color white.
}
Okay.. But cant see a reason for changin leader to white,
It was an example. You can find other RGB colour values by searching ******.
Thats waste of time since i got over 160 colours in a .txt document


Re: Problem with name color thing, - Calgon - 19.08.2009

Quote:
Originally Posted by guaid
Quote:
Originally Posted by Calgon
Quote:
Originally Posted by guaid
Quote:
Originally Posted by Calgon
You'll want to get the RGB colour and use SetPlayerColor().

Here's a quick example, even though the wiki explains it in better context:

pawn Код:
if(PlayerInfo[playerid][pLeader] == 1)
{
SetPlayerColor(playerid, 255255255); // PD Chief gets color white.
}
Okay.. But cant see a reason for changin leader to white,
It was an example. You can find other RGB colour values by searching ******.
Thats waste of time since i got over 160 colours in a .txt document
Whatever suites you, it was an example. Use COLOR_NAME as defined or whatever then alongside SetPlayerColor().


Re: Problem with name color thing, - Badger(new) - 19.08.2009

There are also hex colours... Easier as you only have to really type 6 numbers between 0x and AA (unless you want to change the alpha value aka transparency).

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

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