10.08.2012, 12:22
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
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); }
}