Wanted color. How can this possibly be wrong? xP - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Wanted color. How can this possibly be wrong? xP (
/showthread.php?tid=215391)
Wanted color. How can this possibly be wrong? xP -
bartje01 - 23.01.2011
Hey guys. I have a public that has to set your color to your team color.
But it must set it to darkred if you are a suspect.
Now if you are a grove member it perfectly sets your color to green or to darkred if you are a suspect.
But when I'm not in any faction my name is white. And when I want to make him suspect then, his name flashes from white to darkred but it has to stay on darkred till the wantedlevel is gone.
please help
pawn Код:
public teamcolor(playerid)
{
if(GetPlayerWantedLevel(playerid) >=1)
{
SetPlayerColor(playerid,COLOR_DARKRED);
return 1;
}
if(cop[playerid] >=1) SetPlayerColor(playerid,COLOR_BLUE);
else
if(grove[playerid] >=1) SetPlayerColor(playerid,COLOR_GREEN);
else
if(civ[playerid] >=1) SetPlayerColor(playerid,COLOR_WHITE);
return 1;
}
Re: Wanted color. How can this possibly be wrong? xP -
DeathOnaStick - 23.01.2011
Quote:
Originally Posted by bartje01
Hey guys. I have a public that has to set your color to your team color.
But it must set it to darkred if you are a suspect.
Now if you are a grove member it perfectly sets your color to green or to darkred if you are a suspect.
But when I'm not in any faction my name is white. And when I want to make him suspect then, his name flashes from white to darkred but it has to stay on darkred till the wantedlevel is gone.
please help
pawn Код:
public teamcolor(playerid) { if(GetPlayerWantedLevel(playerid) >=1) { SetPlayerColor(playerid,COLOR_DARKRED); return 1; } if(cop[playerid] >=1) SetPlayerColor(playerid,COLOR_BLUE); else if(grove[playerid] >=1) SetPlayerColor(playerid,COLOR_GREEN); else if(civ[playerid] >=1) SetPlayerColor(playerid,COLOR_WHITE);
return 1; }
|
Try:
pawn Код:
public teamcolor(playerid)
{
if(GetPlayerWantedLevel(playerid) >=1)
{
SetPlayerColor(playerid,COLOR_DARKRED);
return 1;
}
else
{
if(cop[playerid] >=1) SetPlayerColor(playerid,COLOR_BLUE);
else
if(grove[playerid] >=1) SetPlayerColor(playerid,COLOR_GREEN);
else
if(civ[playerid] >=1) SetPlayerColor(playerid,COLOR_WHITE);
}
return 1;
}
Re: Wanted color. How can this possibly be wrong? xP -
bartje01 - 23.01.2011
Still doesn't work :[
Re: Wanted color. How can this possibly be wrong? xP -
DeathOnaStick - 23.01.2011
Quote:
Originally Posted by bartje01
Still doesn't work :[
|
Please again explain whats going wrong
Re: Wanted color. How can this possibly be wrong? xP -
bartje01 - 23.01.2011
Alright.
When someone isn't in any faction their variable is "civ"
And when I want to make someone wanted when he is a civ his name is flashing from white to darkred and then again to white and so it goes on.
But when he is a grove member it works fine.
Re: Wanted color. How can this possibly be wrong? xP -
bartje01 - 23.01.2011
PROBLEM SOLVED.!!
I had another timer that was setting my name to white ! xD
I'm so stupid xP
Thanks for helping though.!