Wanted
#1

How i can make that
pawn Код:
if(WantedPoints[playerid] >1)
    {
     SetPlayerColor(playerid,COLOR_RED);
     }
     else if(WantedPoints[playerid] == 0)
     SetPlayerColor(playerid,COLOR_WHITE);
     }
Reply
#2

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;
}
Reply
#3

Код:
        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.
Reply
#4

i changed

pawn Код:
else SetPlayerColor(playerid,COLOR_WHITE);
Reply
#5

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..
Reply
#6

Much simplier way, takes only one line.

pawn Код:
SetPlayerColor(playerid, (GetPlayerWantedLevel(playerid) > 1) ? COLOR_RED : COLOR_WHITE);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)