Check if player sit to vehicle
#1

Hi,

It's possible to check when player press G sit so vehicle as passenger and run away?
Reply
#2

Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
     if(ispassenger == 1)
     {
         //entered as a passanger
     }
     return 1;
}
Reply
#3

Yes i know how to check but i want to know if he press g and he run not enter to vehicle
Reply
#4

https://sampwiki.blast.hk/wiki/OnPlayerStateChange
Reply
#5

And what how do with it?
Reply
#6

I dont get it, how the fuck can someone run away if he's sitting as passenger?
Reply
#7

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?
Reply
#8

Do you mean you want to detect if the player using car door bug abuse?
Reply
#9

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
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)