Check if player sit to vehicle - 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)
+--- Thread: Check if player sit to vehicle (
/showthread.php?tid=606167)
Check if player sit to vehicle -
ScIrUsna - 30.04.2016
Hi,
It's possible to check when player press G sit so vehicle as passenger and run away?
Re: Check if player sit to vehicle -
Sawalha - 30.04.2016
Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(ispassenger == 1)
{
//entered as a passanger
}
return 1;
}
Re: Check if player sit to vehicle -
ScIrUsna - 01.05.2016
Yes i know how to check but i want to know if he press g and he run not enter to vehicle
Re: Check if player sit to vehicle -
2k16 - 01.05.2016
https://sampwiki.blast.hk/wiki/OnPlayerStateChange
Re: Check if player sit to vehicle -
ScIrUsna - 01.05.2016
And what how do with it?
Re: Check if player sit to vehicle -
Ritzy2K - 01.05.2016
I dont get it, how the fuck can someone run away if he's sitting as passenger?
Re: Check if player sit to vehicle -
Sjn - 01.05.2016
He probably wants to detect if a player presses G to get inside a vehicle while still on foot (from what I could notice :P).
This kind of thing applies for anti passenger seat abuse system. What are you making btw?
Re: Check if player sit to vehicle -
oMa37 - 01.05.2016
Do you mean you want to detect if the player using car door bug abuse?
Re: Check if player sit to vehicle -
ScIrUsna - 01.05.2016
Like OnPlayerEnterVehicle calls when you attempt sit to vehicle but not fulled sit, but it's not mean you go and sit to vehicle you can run or press enter just cancel, i think settimer and check is in vehicle after certain time but maybe there is somethink better
Re: Check if player sit to vehicle -
DRIFT_HUNTER - 01.05.2016
Just use OnPlayerEnterVehicle, set timer of about 2-3 seconds and check if player state is passenger/driver. And play with timing a little bit.