SA-MP Forums Archive
Some players spawning with black 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: Some players spawning with black color? (/showthread.php?tid=657170)



Some players spawning with black color? - AlexMSK - 02.08.2018

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:

PHP код:

foreach(new Player)
{
    if(!
PlayerInfo[i][pBackup])
    {
        if(
GetPVarInt(i"Jailed") > 0) {
            
SetPlayerColor(i0xAD7A2100);
        } else if(
PlayerInfo[i][pFaction] >= && PlayerInfo[i][pDuty] && FactionInfo[PlayerInfo[i][pFaction]][fType] != FACTION_HITMAN) {
            
SetPlayerColor(iFactionInfo[PlayerInfo[i][pFaction]][fColor] & ~0xff);
        } else if(
GetPlayerJob(iJOB_TAXIDRIVER) && GetPVarInt(i"TaxiFare") > 0) {
            
SetPlayerColor(i0xF5DEB300);
        } else {
            
SetPlayerColor(i0xFFFFFF00);
        }
    }

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.


Re: Some players spawning with black color? - AndreProgrammer - 02.08.2018

Try this

PHP код:
foreach(new Player

    if(!
PlayerInfo[i][pBackup]) 
    { 
        if(
GetPVarInt(i"Jailed") > 0) { 
            
SetPlayerColor(i0xAD7A21FF); 
        } else if(
PlayerInfo[i][pFaction] >= && PlayerInfo[i][pDuty] && FactionInfo[PlayerInfo[i][pFaction]][fType] != FACTION_HITMAN) { 
            
SetPlayerColor(iFactionInfo[PlayerInfo[i][pFaction]][fColor] & ~0xff); 
        } else if(
GetPlayerJob(iJOB_TAXIDRIVER) && GetPVarInt(i"TaxiFare") > 0) { 
            
SetPlayerColor(i0xF5DEB3FF); 
        } else { 
            
SetPlayerColor(i0xFFFFFFFF); 
        } 
    }