Change Name color - 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: Change Name color (
/showthread.php?tid=367551)
Change Name color -
stefanlg - 10.08.2012
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
Re: Change Name color -
[MM]RoXoR[FS] - 10.08.2012
SetPlayerColor works.
Make sure if you have any SetPlayerMarkerForPlayer, it can change the color aswell.
Show the code, if it does not work.
Re: Change Name color -
stefanlg - 10.08.2012
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.
Re: Change Name color -
[MM]RoXoR[FS] - 10.08.2012
What color does he have??
Do you have any SetPlayerMarkerForPlayer?
Re: Change Name color -
stefanlg - 10.08.2012
His name is still white, It should be blue and the color code it correct.
And for the SetPlayerMarkerForPlayer no there is none
Re: Change Name color -
stefanlg - 10.08.2012
dump