onPedVehicleEnter
ServerEvent
Fired on the server when a ped (not a player) has finished getting into a vehicle.
addEventHandler("onPedVehicleEnter", 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 ped.
It also fires when warpPedIntoVehicle puts the ped in the vehicle.
Example
addEventHandler("onPedVehicleEnter", root, function(vehicle, seat)
setVehicleEngineState(vehicle, seat == 0)
end)