# onClientVehicleStartExit (Client)

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

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Event
- **Side**: Client
- **Category**: Vehicles
- **Cancellable**: `cancelEvent`
- **URL**: https://wiki.mymp.gg/en/onClientVehicleStartExit

## Syntax

```lua
addEventHandler("onClientVehicleStartExit", root, function(ped ped, int seat, int door) ... end)
```

## Handler parameters

| Name | Type | Description |
| --- | --- | --- |
| `ped` | `ped` | The ped or player getting out. |
| `seat` | `int` | The seat: 0 is the driver's, 1 onwards the passengers'. |
| `door` | `int` | The 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

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

## See also

- [onClientVehicleExit (Client)](https://wiki.mymp.gg/en/onClientVehicleExit.md): Fired on the client when a ped leaves a vehicle.
- [onClientVehicleStartEnter (Client)](https://wiki.mymp.gg/en/onClientVehicleStartEnter.md): Fired on the client when a ped starts getting into a vehicle. Cancelling the event stops it.
- [onVehicleStartExit (Server)](https://wiki.mymp.gg/en/onVehicleStartExit.md): 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.
