Coding with two different players in one loop? (how to assign variables for checking?)
#3

Quote:
Originally Posted by Quickie
Посмотреть сообщение
change it to :
pawn Код:
new wantedid[MAX_PLAYERS],ticketid[MAX_PLAYERS] // declare this on top of your script not inside your public OnPlayerUpdate2() (remove the variable wantedid and the ticketid cuz u already have a gloval var wantedid[MAX_PLAYERS] and ticketid[MAX_PLAYERS]

// and reset it everytime player disconnects
public OnPlayerDisconnect(playerid, reason)
{
      wantedid[playerid]=0;
      ticketid[playerid]=0;
}
I thought about this too; but;

wouldn't i have to declare their id's anyway? like this:

pawn Код:
if(GetPlayerWantedLevel(i) > 1)
   wantedid[i]= i;
or could i simply just say that "this player is wanted" because the value is 1?
pawn Код:
if(GetPlayerWantedLevel(i) > 1)
   wantedid[i]= 1;
This bit confuses me a bit, because i can't imagine it in my head as i do with many other things


EDIT: Because i can't do this:
pawn Код:
if(IsPlayerInAnyVehicle(ticketid[i]))
Or at least, i don't think you can. "i" is already looped through to check the cop?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)