Change Name color
#1

i know im probably overlooking it but i've tried SetPlayerColor to try and change a players name to a different color instead of the default white. Anyone know the correct function beause this hasent been working
Reply
#2

SetPlayerColor works.

Make sure if you have any SetPlayerMarkerForPlayer, it can change the color aswell.

Show the code, if it does not work.
Reply
#3

Still hasent been working.

Код:
public OnPlayerSpawn(playerid)
{
    TextDrawDestroy(BottomMessage);
    OnPlayerFactionSpawn(playerid, 1);
	if(PLAYERLIST_authed[playerid] == 0)
	{
		SendClientMessage(playerid, COLOR_ADMIN_RED, ".:: [KICK]: You have been kicked because you failed to login before spawning.");
		Kick(playerid);
	}
	return true;
}
Код:
public OnPlayerFactionSpawn(playerid, enable)
{
	if(PLAYERLIST_authed[playerid] == 1)
	{
		if(PlayerInfo[playerid][pMember] == 0)
	 	{
   			if( enable == 1 ) { SetPlayerInterior(playerid, 0); SetPlayerPos(playerid, 1675.3665, 1447.7437, 10.7876); }
   			PlayerInfo[playerid][pRank] = 0; SetPlayerColor(playerid, COLOR_WHITE);
			if(PlayerInfo[playerid][pSkin] > 0) { SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]); }
			if(IsReservedSkin(playerid))
			{
			    SetPlayerSkin(playerid, 7); PlayerInfo[playerid][pSkin] = 7;
			}
		}
		else if(PlayerInfo[playerid][pMember] == 1)// PD
		{
			if( enable == 1 ) { SetPlayerInterior(playerid, 3); SetPlayerPos(playerid, 229.5135,165.1738,1003.0234); }
			if(PlayerInfo[playerid][pSex] == 2)
			{
				if(PlayerInfo[playerid][pRank] == 1) { SetPlayerSkin(playerid, 280); PlayerInfo[playerid][pSkin] = 280; SetPlayerColor(playerid, COLOR_PDMEMBER);}
				else if(PlayerInfo[playerid][pRank] == 2) { SetPlayerSkin(playerid, 280); PlayerInfo[playerid][pSkin] = 280; SetPlayerColor(playerid, COLOR_PDMEMBER);}
				else if(PlayerInfo[playerid][pRank] == 3) { SetPlayerSkin(playerid, 281); PlayerInfo[playerid][pSkin] = 281; SetPlayerColor(playerid, COLOR_PDMEMBER);}
				else if(PlayerInfo[playerid][pRank] == 4) { SetPlayerSkin(playerid, 281); PlayerInfo[playerid][pSkin] = 281; SetPlayerColor(playerid, COLOR_PDMEMBER);}
				else if(PlayerInfo[playerid][pRank] == 5) { SetPlayerSkin(playerid, 282); PlayerInfo[playerid][pSkin] = 282; SetPlayerColor(playerid, COLOR_PDMEMBER);}
				else if(PlayerInfo[playerid][pRank] == 6) { SetPlayerSkin(playerid, 282); PlayerInfo[playerid][pSkin] = 282; SetPlayerColor(playerid, COLOR_PDMEMBER);}
				else if(PlayerInfo[playerid][pRank] == 7) { SetPlayerSkin(playerid, 288); PlayerInfo[playerid][pSkin] = 288; SetPlayerColor(playerid, COLOR_PDLEADER);}
				else if(PlayerInfo[playerid][pRank] == 8) { SetPlayerSkin(playerid, 283); PlayerInfo[playerid][pSkin] = 283; SetPlayerColor(playerid, COLOR_PDLEADER);}
				else if(PlayerInfo[playerid][pRank] == 9) { SetPlayerSkin(playerid, 295); PlayerInfo[playerid][pSkin] = 295; SetPlayerColor(playerid, COLOR_FACTIONLEADER);}
			} else { SetPlayerSkin(playerid, 211); PlayerInfo[playerid][pSkin] = 211; SetPlayerColor(playerid, COLOR_PDMEMBER); }
  		}
I set the player so he is in pMember 1 and he spawn's as a police officer and everything works fine except his name color.
Reply
#4

What color does he have??
Do you have any SetPlayerMarkerForPlayer?
Reply
#5

His name is still white, It should be blue and the color code it correct.
And for the SetPlayerMarkerForPlayer no there is none
Reply
#6

dump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)