how can i check if a player is a Passanger? - 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: how can i check if a player is a Passanger? (
/showthread.php?tid=72777)
how can i check if a player is a Passanger? -
Castle - 10.04.2009
how can i check if a player is a Passenger?
I mean that OnPlayerStateChange
I did this:
pawn Код:
if(newstate && PLAYER_STATE_DRIVER)
{
return 1;
}
but how to check if the player is a passenger?
Re: how can i check if a player is a Passanger? -
pspleo - 10.04.2009
I think there is a PLAYER_STATE_PASSENGER?
GetPlayerState(playerid) == PLAYER_STATE_PASSENGER
Re: how can i check if a player is a Passanger? -
tom_jonez - 10.04.2009
pawn Код:
public OnPlayerStateChange(playerid,newstate,oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
printf("ID %i is now driving.",playerid);
}
if(newstate == PLAYER_STATE_PASSENGER)
{
printf("ID %i is now in a vehicle.",playerid);
}
return 1;
}
There you go