OnClientPlayerVehicleEnter: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
 
mNo edit summary
 
(15 intermediate revisions by 9 users not shown)
Line 1: Line 1:
[[Category:Incomplete Event]]
{{Client event}}
__NOTOC__
This event is fired when a player has entered a vehicle.


__NOTOC__
==Parameters==
This event is blahblah and is used for blahblah.
<syntaxhighlight lang="lua">
vehicle theVehicle, int seat
</syntaxhighlight>
*'''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.


==Syntax==  
==Source==
<syntaxhighlight lang="lua">
The [[event system#Event source|source]] of this event is the [[player]] that entered the vehicle.
void onClientPlayerVehicleEnter ( vehicle theVehicle, int seat )
</syntaxhighlight>


==Example==  
==Example==
This example does...
This example will tell you the name of the vehicle you enter.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
--This line does...
function checkVehicles(theVehicle)
blabhalbalhb --abababa
outputChatBox("You entered a "..getVehicleName(theVehicle).."!")
--This line does this...
end
mooo
addEventHandler("onClientPlayerVehicleEnter", localPlayer, checkVehicles)
</syntaxhighlight>
</syntaxhighlight>
==See Also==
'''<big>Related</big>'''
</br>
[[onClientVehicleStartEnter]]
</br>
[[onClientVehicleExit]]
===Client player events===
{{Client_player_events}}
===Client event functions===
{{Client_event_functions}}

Latest revision as of 18:31, 29 November 2020

This event is fired when a player 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 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