M MY Multiplayer: Wiki
Side
Kind

onVehicleStartEnter

ServerEventCancellable

Fired on the server when a ped starts getting into a vehicle. Cancelling the event stops it.

addEventHandler("onVehicleStartEnter", root, function(ped ped, int seat, ped|false jacked, int door) … end)

Handler parameters

NameTypeDescription
pedpedThe ped or player getting in.
seatintThe seat: 0 is the driver's, 1 onwards the passengers'.
jackedped|falseThe driver about to be pulled out, or false.
doorintThe door used: 0 the driver's, 1 the front passenger's, 2 the rear one on the driver's side, 3 the rear one on the passenger's side, 4 a bike's from the front.

Source

The vehicle.

When the ped is jacking the car, onVehicleStartExit fires right after for the driver, and cancelling either of them stops the jack.

Example

addEventHandler("onVehicleStartEnter", root, function(ped, seat, jacked)
    if jacked then
        cancelEvent()
    end
end)

See also