# onClientVehicleEnter (Client)

> Fired on the client when a ped has finished getting into a vehicle.

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

## Syntax

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

## Handler parameters

| Name | Type | Description |
| --- | --- | --- |
| `ped` | `ped` | The ped or player that got in. |
| `seat` | `int` | The seat: 0 is the driver's, 1 onwards the passengers'. |

## Source

The vehicle.

Cancelling only works when a ped created on this client gets into a vehicle created on this client: the ped is put back out. Otherwise cancelling changes nothing.

## Example

```lua
addEventHandler("onClientVehicleEnter", root, function(ped, seat)
    if ped == localPlayer and seat == 0 then
        outputDebugString("You are driving")
    end
end)
```

## See also

- [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.
- [onClientVehicleExit (Client)](https://wiki.mymp.gg/en/onClientVehicleExit.md): Fired on the client when a ped leaves a vehicle.
- [onClientPlayerVehicleEnter (Client)](https://wiki.mymp.gg/en/onClientPlayerVehicleEnter.md): Fired on the client when a player has finished getting into a vehicle.
- [onVehicleEnter (Server)](https://wiki.mymp.gg/en/onVehicleEnter.md): Fired on the server when a ped has finished getting into a vehicle.
