Get a players seat ID - 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: Get a players seat ID (
/showthread.php?tid=78285)
Get a players seat ID -
MPKaboose - 18.05.2009
How can I get a players seat ID like
Код:
0-driver, 1-co-driver, 2&3-passengers
I really need this
Thanks,
ArcticFox
Re: Get a players seat ID -
Correlli - 18.05.2009
I'm not sure if you can do that.
I know that you can set players seat.
https://sampwiki.blast.hk/wiki/PutPlayerInVehicle
Try to create your own function which would get the seat id with help of this one.
Re: Get a players seat ID -
MPKaboose - 18.05.2009
Thanks I think I already have the first idea how to make that
Re: Get a players seat ID -
FUNExtreme - 18.05.2009
You could use GetPlayerState for the driver.
Re: Get a players seat ID -
Correlli - 18.05.2009
Quote:
Originally Posted by FUNExtreme
You could use GetPlayerState for the driver.
|
0 Empty (while initializing)
1 Player is on foot
2 Player is driver of a vehicle
3 Player is passenger of a vehicle
7 Player is wasted or on class selection
8 Player is spawned
You can figure who's driver and passenger, but too bad you can't see on which seat is he sitting.
Re: Get a players seat ID -
MPKaboose - 18.05.2009
Quote:
Originally Posted by FUNExtreme
You could use GetPlayerState for the driver.
|
Yeah thats the driver but what about the passengersin the back seats (2/3)
Re: Get a players seat ID -
FUNExtreme - 18.05.2009
I did some fast searching and it seems impossible. I'm not sure
Re: Get a players seat ID -
Correlli - 18.05.2009
Quote:
Originally Posted by FUNExtreme
I did some fast searching and it seems impossible. I'm not sure
|
Why not? If you are using PutPlayerInVehicle it may work.
You can create new function like PutPlayerInVehicleEx in which you could store the seatid you have setted.
Later you can get the stored seatid.
Re: Get a players seat ID -
MPKaboose - 18.05.2009
Quote:
Originally Posted by Don Correlli
Quote:
Originally Posted by FUNExtreme
I did some fast searching and it seems impossible. I'm not sure
|
Why not? If you are using PutPlayerInVehicle it may work.
You can create new function like PutPlayerInVehicleEx in which you could store the seatid you have setted.
Later you can get the stored seatid.
|
Maybe if (strange method xD) when entering a car (hit enter) a menu pops up (stops you from entering the vehicle) and you selected the seat then I can store it where the player selected lather I can use that thanks for the help again
EDIT: How can I stop a player to enter a vehicle after hitting enter?
Re: Get a players seat ID -
FUNExtreme - 19.05.2009
pawn Код:
OnPlayerEnterVehicle(blah)
{
return 0;
}
Or
pawn Код:
OnPlayerStateChange(blah)
{
if(newstate == PLAYER_STATE_DRIVING)
{
RemovePlayerFromVehicle(playerid);
return 1;
}
return 1;
}