OnClientPlayerVehicleEnter

From Multi Theft Auto: Wiki
Revision as of 04:41, 20 October 2020 by Dutchman101 (talk | contribs) (t)
Jump to navigation Jump to search

This event is fired when a player or ped has entered a vehicle.

Parameters

vehicle theVehicle, int seat
  • theVehicle: the vehicle that the player entered
  • seat: the seat that the player now is on. Driver's seat = 0, higher numbers are passenger seats.

Source

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

Example

This example will tell you the name of the vehicle you enter.

function checkVehicles(theVehicle)
	outputChatBox("You entered a "..getVehicleName(theVehicle).."!")
end
addEventHandler("onClientPlayerVehicleEnter", localPlayer, checkVehicles)

See Also

Related
onClientVehicleStartEnter
onClientVehicleExit

Client player events


Client event functions