# onPlayerVehicleEnter (Server)

> Fired on the server when a player has finished getting into a vehicle.

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

## Syntax

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

## Handler parameters

| Name | Type | Description |
| --- | --- | --- |
| `vehicle` | `vehicle` | The vehicle. |
| `seat` | `int` | The seat: 0 is the driver's, 1 onwards the passengers'. |
| `jacked` | `ped\|false` | The ped that was in the seat and was taken out, or `false`. |

## Source

The player.

It also fires when `warpPedIntoVehicle` puts the ped in the vehicle.

## Example

```lua
addEventHandler("onPlayerVehicleEnter", root, function(vehicle, seat, jacked)
    if seat == 0 then
        outputDebugString(getPlayerName(source) .. " pegou o volante")
    end
end)
```

## See also

- [onPlayerVehicleExit (Server)](https://wiki.mymp.gg/en/onPlayerVehicleExit.md): Fired on the server when a player leaves a vehicle.
- [onVehicleEnter (Server)](https://wiki.mymp.gg/en/onVehicleEnter.md): Fired on the server when a ped has finished getting into a vehicle.
- [onPedVehicleEnter (Server)](https://wiki.mymp.gg/en/onPedVehicleEnter.md): Fired on the server when a ped (not a player) has finished getting into a vehicle.
- [warpPedIntoVehicle (Shared)](https://wiki.mymp.gg/en/warpPedIntoVehicle.md): Puts a ped or player straight into a vehicle seat, with no animation.
