From Multi Theft Auto: Wiki
Revision as of 23:11, 30 December 2019 by Zangomangu (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This event is triggered when a player or ped exits a vehicle.


vehicle theVehicle, int seat
  • theVehicle: the vehicle that the player exited.
  • seat: the number of the seat that the player was sitting on.


The source of this event is the player or ped that exited the vehicle.


This example outputs a chat box message with player's name and vehicle name when someone leave vehicle.

addEventHandler("onClientPlayerVehicleExit", getRootElement(),

function (vehicle, seat)

local vehicleName = getVehicleName(vehicle)
outputChatBox("Player " .. getPlayerName(source) .. " has left the " .. vehicleName)


See Also

Client player events

Client event functions