M MY Multiplayer: Wiki
Side
Kind

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

NameTypeDescription
vehiclevehicleThe vehicle.
seatintThe seat: 0 is the driver's, 1 onwards the passengers'.
jackedped|falseThe 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)

See also