M MY Multiplayer: Wiki
Side
Kind

onPlayerVehicleEnter

ServerEvent

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

addEventHandler("onPlayerVehicleEnter", 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 player.

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

Example

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

See also