M MY Multiplayer: Wiki
Side
Kind

onClientVehicleStartExit

ClientEventCancellable

Fired on the client when a ped starts getting out of a vehicle. Cancelling the event stops it.

addEventHandler("onClientVehicleStartExit", root, function(ped ped, int seat, int door) … end)

Handler parameters

NameTypeDescription
pedpedThe ped or player getting out.
seatintThe seat: 0 is the driver's, 1 onwards the passengers'.
doorintThe door used. For a ped of this client it is SA's door id (10 driver, 8 front passenger, 11 rear on the driver's side, 9 rear on the passenger's side, 18 a bike from the front); for other peds, the index 0 to 4 in the order driver, front passenger, rear driver's side, rear passenger's side, bike.

Source

The vehicle.

Cancelling only works for this client's peds (the local player, the peds it syncs and the ones it created). For other peds the event arrives after the server accepted, and cancelling changes nothing.

Example

addEventHandler("onClientVehicleStartExit", root, function(ped)
    if ped == localPlayer and getElementData(localPlayer, "corrida") then
        cancelEvent()
    end
end)

See also