Parameter
#1

Parameter ispassenger from callback OnPlayerEnterVehicle , it's for
GetPlayerState(playerid) == 2 || GetPlayerState(playerid) == 3 ?
Reply
#2

better use:

Код:
PLAYER_STATE_DRIVER
PLAYER_STATE_ONFOOT,
PLAYER_STATE_PASSANGER,
Reply
#3

yes but i was just wondering if ispassenger is something like thiss
pawn Код:
ispassenger()
{
   for(new p; p < GetMaxPlayers(); p++)
   {
     if(GetPlayerState(p) == 2 || GetPlayerState(p) == 3)
     {
     }
   }
   return -5;
}
Reply
#4

Not sure what that would do... it's gonna return -5 whatever the outcome. If you're trying to see if a player is a Passenger:

pawn Код:
IsPassenger(playerid)
{
   if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return 1;
   return 0;
}
But this is fairly pointless, as you could just use GetPlayerState without wrapping it up in a function.
Reply
#5

return < 0 it's == 0 , return > 0 it's == 1
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)