02.08.2018, 09:19
Hi all, well i don't know what to say about this but, every time a new player come into the server, he spawn with black color, i've tried to fix it by doing this:
On player update, also tried to add it as a timer under ongamemodeint and still doesn't work, how can i find out from where do this players are getting that black color?
I've also added SetPlayerColor on player connect, as well as on player spawn but still it doesn't set them the color.
PHP код:
foreach(new i : Player)
{
if(!PlayerInfo[i][pBackup])
{
if(GetPVarInt(i, "Jailed") > 0) {
SetPlayerColor(i, 0xAD7A2100);
} else if(PlayerInfo[i][pFaction] >= 0 && PlayerInfo[i][pDuty] && FactionInfo[PlayerInfo[i][pFaction]][fType] != FACTION_HITMAN) {
SetPlayerColor(i, FactionInfo[PlayerInfo[i][pFaction]][fColor] & ~0xff);
} else if(GetPlayerJob(i, JOB_TAXIDRIVER) && GetPVarInt(i, "TaxiFare") > 0) {
SetPlayerColor(i, 0xF5DEB300);
} else {
SetPlayerColor(i, 0xFFFFFF00);
}
}
}
I've also added SetPlayerColor on player connect, as well as on player spawn but still it doesn't set them the color.