From Civilian Color to Wanted Color
#1

Hello guys, I don't have idea where to start with this.

Let me give you an example:
For an example: A player is an innocent civilian, and after that he robbed a player, he gets 3 wanted level, and his color should change to yellow, what should I do?

Just to keep update the player's color with their wanted level. Thanks in advance, because I don't even know how to script this handy thing.
Reply
#2

when the player robs another player, https://sampwiki.blast.hk/wiki/SetPlayerWantedLevel and https://sampwiki.blast.hk/wiki/SetPlayerColor
Reply
#3

I just need to update their status and their color when they become a wanted, not with this. Sorry. :/
Reply
#4

Quote:
Originally Posted by LeeXian99
Посмотреть сообщение
I just need to update their status and their color when they become a wanted, not with this. Sorry. :/
well, i just told you how..
Reply
#5

As Ada32 said, use those functions in a function you made.
Reply
#6

pawn Код:
public OnPlayerSpawn(playerid)
{
    if(civilian(mode from your GM))
    {
        SetPlayerColor(playerid,COLOR_WHITE);
    }
    if(LSPD(mode from your GM))
    {
        SetPlayerColor(playerid,COLOR_BLUE);
    }
    return 1;
}
or you can put this on , OnPlayerConnect , don't forget to define the color on top of GM
Reply
#7

He asks when a play robs a player and he gets color yellow, i think he know the code already, but he dont know where to place the code. atleast thats my case
Reply
#8

If he has a code that initiates after someone is being robbed, add that code under the last part of that script. Otherwise you can setup a timer that starts at onplayerconnect. Name it for example OnPlayerUpdateEx, run it every 1 sec or so, whatever suits you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)