SA-MP Forums Archive
Wanted Level help? +REP - 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 Level help? +REP (/showthread.php?tid=333470)



Wanted Level help? +REP - TheMightyEddy - 11.04.2012

This is what I mean: Lets pretend. I'm civilian and you are cop.

1. I kill you or anyone (my name turns orange on everyone's screen because i'm now wanted and i have wanted stars)
2. you arrest me and i go to jail
3. I get out of jail after my jail time is up.
4. I kill you again but I don't turn orange. I stay white (not wanted). But on my screen, I'm wanted (4 stars).

But cops can still /arrest me if they "guess" that I'm wanted which they won't. so how do I fix this?


Re: Wanted Level help? +REP - Jonny5 - 11.04.2012

post your code!


Re: Wanted Level help? +REP - ...: 1 :... - 11.04.2012

Try SetPlayerWantedLevel.
Then use assign a variable "wanted" or whatever,then if you use foreach, check if a player's variable "wanted" == 1, or whatever, then get it to show their name.


Re: Wanted Level help? +REP - TheMightyEddy - 11.04.2012

Here is my code:

Код:
	{
    KillerLevel[killerid] += 4;
    SetPlayerWantedLevel(killerid, KillerLevel[killerid]);
    KillerTime[killerid] = SetTimerEx("KillerTimer", 300000, true, "u", killerid);
    SendClientMessage(COLOR_WHITE, killerid, "You are now wanted for murder, you will lose a star every 5 minutes.");
	}



Re: Wanted Level help? +REP - TheMightyEddy - 11.04.2012

Anyone please?


Re: Wanted Level help? +REP - Jochemd - 11.04.2012

We need the part before this too. Post the whole command!


Re: Wanted Level help? +REP - ColdRain - 11.04.2012

You can do like this SetPlayerWantedLevel(playerid,GetPlayerWantedLevel (playerid) +4); instead of LevelKilling[platyerid] +=4

and if you want make him Orange use this


forward WantedOrange(playerid)
public WantedOrange(playerid)
{

if(GetPlayerWantedLevel(playerid) >= 4)
SetPlayerColor(playerid,COLOR_ORANGE)
return 1;
}


Re: Wanted Level help? +REP - TheMightyEddy - 11.04.2012

Wait I don't get it. Can anyone clarify for me?


Re: Wanted Level help? +REP - TheMightyEddy - 11.04.2012

This is good. Thanks to everyone!