M MY Multiplayer: Wiki
Side
Kind

onVehicleStartExit

ServerEventCancellable

Fired on the server when a ped starts getting out of a vehicle or is about to be pulled out. Cancelling the event stops it.

addEventHandler("onVehicleStartExit", root, function(ped ped, int seat, ped|false jacker, int door) … end)

Handler parameters

NameTypeDescription
pedpedThe ped or player getting out.
seatintThe seat: 0 is the driver's, 1 onwards the passengers'.
jackerped|falseWho is pulling the ped 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. Not given when the ped is pulled out.

Source

The vehicle.

When the ped is being pulled out, cancelling stops the jack.

Example

addEventHandler("onVehicleStartExit", root, function(ped, seat)
    if getElementData(ped, "algemado") then
        cancelEvent()
    end
end)

See also