# Server

## Entering Vehicle

Will be called when entering a vehicle

<mark style="color:green;">**Returns**</mark>\
**plate** - `string` - Plate of the vehicle\
**seat** - `number` - Steat of the vehicle the player is entering\
**netId** - `number` - Vehicles NetworkId\
**isEngineOn** - `boolean` - whether the engine is on or off\
**isDamaged** - `boolean` - whether the vehicle is damaged or not

```lua
RegisterNetEvent('msk_enginetoggle:enteringVehicle', function(plate, seat, netId, isEngineOn, isDamaged)
    local vehicle = NetworkGetEntityFromNetworkId(netId)
    -- Do something here
end)
```

## Entered Vehicle

Will be called when entered a vehicle

<mark style="color:green;">**Returns**</mark>\
**plate** - `string` - Plate of the vehicle\
**seat** - `number` - Steat of the vehicle the player has entered\
**netId** - `number` - Vehicles NetworkId\
**isEngineOn** - `boolean` - whether the engine is on or off\
**isDamaged** - `boolean` - whether the vehicle is damaged or not

```lua
RegisterNetEvent('msk_enginetoggle:enteredVehicle', function(plate, seat, netId, isEngineOn, isDamaged)
    local vehicle = NetworkGetEntityFromNetworkId(netId)
    -- Do something here
end)
```

## Exited Vehicle

Will be called when exited a vehicle

<mark style="color:green;">**Returns**</mark>\
**plate** - `string` - Plate of the vehicle\
**seat** - `number` - Steat of the vehicle the player has exited\
**netId** - `number` - Vehicles NetworkId\
**isEngineOn** - `boolean` - whether the engine is on or off\
**isDamaged** - `boolean` - whether the vehicle is damaged or not

```lua
RegisterNetEvent('msk_enginetoggle:exitedVehicle', function(plate, seat, netId, isEngineOn, isDamaged)
    local vehicle = NetworkGetEntityFromNetworkId(netId)
    -- Do something here
end)
```
