Wanted level system?? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Wanted level system?? (
/showthread.php?tid=176172)
Wanted level system?? -
Face9000 - 12.09.2010
Hi all,im searching a wanted level system.
Example: I kill 5 players and i get 1 star wanter,10 players 2 starts and ecc...
Re: Wanted level system?? -
LifeStyle - 12.09.2010
On top:
pawn Код:
new playerskilled[MAX_PLAYERS];
Onplayerdeath
pawn Код:
playerskilled[killerid]++;
if(playerskilled[killerid] == 5)
{
SetPlayerWantedLevel(killerid, 1);
}
etc.
Re: Wanted level system?? -
LarzI - 12.09.2010
Search. There are lots of examples in this forum already.
Re: Wanted level system?? -
Vince - 12.09.2010
Even simpler with the modulus operator:
pawn Код:
if((playerskilled[killerid] % 5) == 0)
{
SetPlayerWantedLevel(killerid, GetPlayerWantedLevel(killerid)+1);
}
Notice: This can get past level 6 eventually.
It probably won't affect the player, and if it does you can simply make a check for it.