SA-MP Forums Archive
SetPlayerColor Not working ... Help :) - 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: SetPlayerColor Not working ... Help :) (/showthread.php?tid=523699)



SetPlayerColor Not working ... Help :) - rockhopper - 03.07.2014

SetPlayerColor Isn't Working On OnPlayerSpawn

Код:
if(gTeam[playerid] == TEAM_COPS)
{
SetPlayerPos(playerid, 1565.7843,-1694.2400,5.8906);
SetPlayerColor(playerid, COLOR_BLACK);
}
The Color Remains White only but the position works And when during my robbery Also The Player Color Works Only this one not working Y


Re: SetPlayerColor Not working ... Help :) - Dziugsas - 03.07.2014

I think your not saving the team to the player variables.Thats why its not working.


Re: SetPlayerColor Not working ... Help :) - greentarch - 03.07.2014

Quote:
Originally Posted by Dziugsas
Посмотреть сообщение
I think your not saving the team to the player variables.Thats why its not working.
This.
In a simple way ---> Did you even set gTeam to TEAM_COP on OnPlayerRequestClass?


Re: SetPlayerColor Not working ... Help :) - rockhopper - 03.07.2014

yes i did green see
Код:
 case 0: 
        { 
            GameTextForPlayer( playerid, "~b~COPS", 500, 3 );
            gTeam[playerid] = TEAM_COPS;
        }



Re: SetPlayerColor Not working ... Help :) - Adityz - 03.07.2014

Quote:
Originally Posted by rockhopper
Посмотреть сообщение
Код:
if(gTeam[playerid] == TEAM_COPS)
{
SetPlayerPos(playerid, 1565.7843,-1694.2400,5.8906);
SetPlayerColor(playerid, COLOR_BLACK);
}
Your 'COLOR_BLACK' may not be defined correctly.
Try using this -
pawn Код:
if(gTeam[playerid] == TEAM_COPS)
{
SetPlayerPos(playerid, 1565.7843,-1694.2400,5.8906);
SetPlayerColor(playerid, 0x000000C8);
}



Re: SetPlayerColor Not working ... Help :) - rockhopper - 03.07.2014

Not working


Re: SetPlayerColor Not working ... Help :) - Blademaster680 - 03.07.2014

Try this:
Код:
if(gTeam[playerid] == TEAM_COPS)
{
    SetPlayerPos(playerid, 1565.7843,-1694.2400,5.8906);
    SetPlayerColor(playerid, 0x000000FF);
}
That should fix the problem


Re: SetPlayerColor Not working ... Help :) - rockhopper - 06.07.2014

not working ... Anything else ?


Re: SetPlayerColor Not working ... Help :) - MehranGta - 06.07.2014

I m sure that your team vars didn't setted currectly.
show the OnPlayerRequestSpawn callback


Re: SetPlayerColor Not working ... Help :) - rockhopper - 06.07.2014

here
Код:
 case 0: 
        { 
            GameTextForPlayer( playerid, "~b~COPS", 500, 3 );
            gTeam[playerid] = TEAM_COPS;
        }