SA-MP Forums Archive
/wanted command - 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 command (/showthread.php?tid=106341)



/wanted command - Jakku - 02.11.2009

I just ask for an interest. How should I make a command loop which goes through all players and gets players which has wanted level 1-4?

I tried to search, no results I searched for.


Re: /wanted command - Burridge - 02.11.2009

These links might help.

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


Re: /wanted command - Jakku - 02.11.2009

Quote:
Originally Posted by XtreaMeR
I'm not setting anyone's wanted level, read the message again


Re: /wanted command - Burridge - 02.11.2009

Read my edit dude.


Re: /wanted command - Sergei - 02.11.2009

pawn Код:
foreach(Player,i)
{
  if(1 <= GetPlayerWantedLevel(i) <= 4) {
//do what you want
  }
}


for(new i=0; i<MAX_PLAYERS; i++)
{
  if(IsPlayerConnected(i)) {
    if(1 <= GetPlayerWantedLevel(i) <= 4) {
//do what you want
    }
  }
}
Foreach and casual edition.


Re: /wanted command - Jakku - 02.11.2009

Quote:
Originally Posted by $ЂЯĢ
pawn Код:
foreach(Player,i)
{
  if(1 <= GetPlayerWantedLevel(i) <= 4) {
//do what you want
  }
}


for(new i=0; i<MAX_PLAYERS; i++)
{
  if(IsPlayerConnected(i)) {
    if(1 <= GetPlayerWantedLevel(i) <= 4) {
//do what you want
    }
  }
}
Foreach and casual edition.
Thanks