SA-MP Forums Archive
Help in making wanted level! - 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: Help in making wanted level! (/showthread.php?tid=618481)



Help in making wanted level! - StrikerZ - 06.10.2016

Basically, like i made a robstore command. And now,on first rob he will get yellow, on second rob, he will get orange, and so on to red. How can i make it?


Re: Help in making wanted level! - Pearson - 06.10.2016

https://sampwiki.blast.hk/wiki/SetPlayerWantedLevel


Re: Help in making wanted level! - SickAttack - 06.10.2016

1. Get player's wanted level
2. Put it inside "switch" (refer to wiki)
3. Set player's color in every case of the switch (refer to wiki)

Remember, refer to wiki!


Re: Help in making wanted level! - StrikerZ - 06.10.2016

I did made switch already but it won't switch


Re: Help in making wanted level! - lackmail - 06.10.2016

add this in your robstore command

Код:
	SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid)+2); //adds 2 starts whenever play types robstore command
	switch (GetPlayerWantedLevel(playerid)) //gets player wanted level
	{
		case 2:
		{
			SetPlayerColor(playerid, 0xFFFF00FF); //if wanted level is 2 player color will be set to yellow
		}
		case 4:
		{
			SetPlayerColor(playerid, 0xFF8000FF); //if wanted level is 4 player color will be set to orange
		}
		case 6:
		{
			SetPlayerColor(playerid, 0xFF0000FF); //if wanted level is 6 player color will be set to red
		}
	}