SA-MP Forums Archive
Heeelp FAST - 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: Heeelp FAST (/showthread.php?tid=624323)



SetPlayerColor [LIKE TEAMS]- - RedRex - 14.12.2016

How to make if player Have 2 Stars = Yellow?

Example

Код:
GetPlayerWanted(playerid, 0);
SetPlayerColor(playerid, COLOR_WHITE);

GetPlayerWanted(playerid, 2);
SetPlayerColor(playerid, COLOR_YELLOW);
How to make it ? FAST HELP PLESAE


Re: Heeelp FAST - GoldenLion - 14.12.2016

You just wrote part of the code.


Re: Heeelp FAST - mahdi499 - 14.12.2016

pawn Код:
if(GetPlayerWantedLevel(playerid) == 2){
                //Do This
}



Re: Heeelp FAST - RedRex - 14.12.2016

Hello, I meaing guyz To if someone got 2 stars His colour set to Yellow

I remember to Put Like that

Код:
public OnPlayerUpdate
GetPlayerWanted(playerid, 0);
SetPlayerColor(playerid, COLOR_WHITE);
Like that I mean guyz My Server is Cops And Robbers


Re: Heeelp FAST - RedRex - 14.12.2016

HEEEEELP ITS EASY JUST HELP ME!!!!

SETPLAYERSCOLOURS


Re: Heeelp FAST - mahdi499 - 14.12.2016

If you bothered to understand the code i wrote you'd know that it's all you need.... Here:

pawn Код:
public OnPlayerUpdate(playerid)
{
    if(GetPlayerWantedLevel(playerid) == 2)
    {
        SetPlayerColor(playerid, 0xFFFF00);
        return 1;
    }
}



Re: Heeelp FAST - SickAttack - 15.12.2016

Quote:
Originally Posted by mahdi499
Посмотреть сообщение
If you bothered to understand the code i wrote you'd know that it's all you need.... Here:

pawn Код:
public OnPlayerUpdate(playerid)
{
    if(GetPlayerWantedLevel(playerid) == 2)
    {
        SetPlayerColor(playerid, 0xFFFF00);
        return 1;
    }
}
Horrible code. It only needs to be used when you give the player wanted level.


Re: Heeelp FAST - StrikerZ - 15.12.2016

Well i do have a cnr gamemode and i use this stock in my script.
PHP код:
SetPlayerWantedLevelEx(playeridlevel)
{
       switch(
level)
       {
            case 
0SetPlayerColor(playerid, -1);
            case 
1SetPlayerColor(playeridCOLOR_YELLOW);
            case 
2SetPlayerColor(playeridCOLOR_ORANGE);
            case 
3SetPlayerColor(playeridCOLOR_ORANGE);
            case 
4SetPlayerColor(playeridCOLOR_RED);
            case 
5SetPlayerColor(playeridCOLOR_DARKRED);
            default: 
SetPlayerColor(playeridCOLOR_DARKRED);
       }
       return 
SetPlayerWantedLevel(playeridlevel);

Example usage:
PHP код:
SetPlayerWantedLevelEx(playerid,2);