/wanted command
#1

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.
Reply
#2

These links might help.

https://sampwiki.blast.hk/wiki/SetPlayerWantedLevel
https://sampwiki.blast.hk/wiki/GetPlayerWantedLevel
Reply
#3

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

Read my edit dude.
Reply
#5

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.
Reply
#6

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)