OnClientPlayerVehicleExit

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

This event is triggered when a player or ped has exited a vehicle.

Parameters

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

Source

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

Example

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)

end)

See Also

Related
onClientVehicleStartExit
onClientVehicleEnter

Client player events


Client event functions