Problem with name color thing,
#1

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,
Reply
#2

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

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

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.
}
Reply
#5

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,
Reply
#6

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 ******.
Reply
#7

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
Reply
#8

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().
Reply
#9

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)