M MY Multiplayer: Wiki
Side
Kind

onClientVehicleExit

ClientEvent

Fired on the client when a ped leaves a vehicle.

addEventHandler("onClientVehicleExit", root, function(ped ped, int seat, ped|false jacker) … end)

Handler parameters

NameTypeDescription
pedpedThe ped or player that left.
seatintThe seat: 0 is the driver's, 1 onwards the passengers'.
jackerped|falseThe ped that pulled it out. false or nil when nobody did.

Source

The vehicle.

It also fires when the ped falls off a bike, is pulled out, dies or is taken out by removePedFromVehicle.

Example

addEventHandler("onClientVehicleExit", root, function(ped, seat, jacker)
    if ped == localPlayer and jacker then
        outputDebugString("Your car was stolen")
    end
end)

See also