Wanted - 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: Wanted (
/showthread.php?tid=371992)
Wanted -
Stereotype - 25.08.2012
How i can make that
pawn Код:
if(WantedPoints[playerid] >1)
{
SetPlayerColor(playerid,COLOR_RED);
}
else if(WantedPoints[playerid] == 0)
SetPlayerColor(playerid,COLOR_WHITE);
}
Re: Wanted -
Stereotype - 25.08.2012
Done
pawn Код:
public WantedColor(playerid)
{
if (IsPlayerConnected(playerid))
{
new wantedlvl = GetPlayerWantedLevel(playerid);
if(wantedlvl <= 1) SetPlayerColor(playerid,COLOR_RED);
else SetPlayerColor(playerid,COLOR_RED);
}
return 1;
}
Re: Wanted -
RedJohn - 25.08.2012
Код:
if(wantedlvl <= 1) SetPlayerColor(playerid,COLOR_RED);
else SetPlayerColor(playerid,COLOR_RED);
Don't forget to change your color for one of these. What's the point of adding same color for 2 things.
Re: Wanted -
Stereotype - 25.08.2012
i changed
pawn Код:
else SetPlayerColor(playerid,COLOR_WHITE);
Re: Wanted -
Lordzy - 25.08.2012
pawn Код:
public OnPlayerUpdate(playerid)
{
if(GetPlayerWantedLevel(playerid) <1)
{
SetPlayerColor(playerid,COLOR_RED);
}
if(GetPlayerWantedLevel(playerid) == 0)
{
SetPlayerColor(playerid,COLOR_WHITE);
return 1;
}
Try this.
Sorry if there's mistake.
Because Im using forums through mobile..
Re: Wanted -
Universal - 25.08.2012
Much simplier way, takes only one line.
pawn Код:
SetPlayerColor(playerid, (GetPlayerWantedLevel(playerid) > 1) ? COLOR_RED : COLOR_WHITE);