# onVehicleStartEnter (Server)

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

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

## Syntax

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

## Handler parameters

| Name | Type | Description |
| --- | --- | --- |
| `ped` | `ped` | The ped or player getting in. |
| `seat` | `int` | The seat: 0 is the driver's, 1 onwards the passengers'. |
| `jacked` | `ped\|false` | The driver about to be pulled 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. |

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

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

## See also

- [onVehicleEnter (Server)](https://wiki.mymp.gg/en/onVehicleEnter.md): Fired on the server when a ped has finished getting into a vehicle.
- [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.
- [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.
- [setVehicleLocked (Shared)](https://wiki.mymp.gg/en/setVehicleLocked.md): Locks or unlocks a vehicle's doors.
