# onVehicleStartExit (Server)

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

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

## Syntax

```lua
addEventHandler("onVehicleStartExit", root, function(ped ped, int seat, ped|false jacker, 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'. |
| `jacker` | `ped\|false` | Who is pulling the ped out, or `false`. |
| `door` | `int` | The 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

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

## See also

- [onVehicleExit (Server)](https://wiki.mymp.gg/en/onVehicleExit.md): Fired on the server when a ped leaves a vehicle.
- [onVehicleStartEnter (Server)](https://wiki.mymp.gg/en/onVehicleStartEnter.md): Fired on the server when a ped starts getting into a vehicle. Cancelling the event stops it.
- [onClientVehicleStartExit (Client)](https://wiki.mymp.gg/en/onClientVehicleStartExit.md): Fired on the client when a ped starts getting out of a vehicle. Cancelling the event stops it.
