SA-MP Forums Archive
Parameter - 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: Parameter (/showthread.php?tid=79575)



Parameter - russiany - 29.05.2009

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


Re: Parameter - Gamer007 - 29.05.2009

better use:

Код:
PLAYER_STATE_DRIVER
PLAYER_STATE_ONFOOT,
PLAYER_STATE_PASSANGER,



Re: Parameter - russiany - 29.05.2009

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;
}



Re: Parameter - Weirdosport - 29.05.2009

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.


Re: Parameter - russiany - 29.05.2009

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