OnClientVehicleStartExit: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Introduced the new event parameter: door)
mNo edit summary
 
(6 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[Category:Incomplete Event]]
{{Client event}}
{{Client event}}
__NOTOC__  
__NOTOC__  
This event is triggered when a player starts exiting a vehicle. Once the exiting animation completes, [[onClientVehicleExit]] is triggered.
This event is triggered when a [[ped]] or [[player]] starts exiting a vehicle. Once the exiting animation completes, [[onClientVehicleExit]] is triggered.


==Parameters==
==Parameters==
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
player thePlayer, int seat, int door
ped thePed, int seat, int door
</syntaxhighlight>
</syntaxhighlight>
*'''thePlayer:''' the player who started exiting the vehicle.
*'''thePed:''' the ped who started exiting the vehicle.
*'''seat:''' the number of the seat that the player was sitting on.
*'''seat:''' the number of the seat that the ped was sitting on.
{{New feature|3.0110|1.1|
{{New feature/item|3.0110|1.1||
*'''door:''' the number of the door that the player is using to leave.
*'''door:''' the number of the door that the ped is using to leave.
}}
}}


==Source==
==Source==
The source of this event is the vehicle that the player started to exit.
The source of this event is the vehicle that the ped started to exit.


==Example==  
==Example==
 
This example outputs to the player that he's leaving the drivers seat.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">function exitingVehicle(player, seat, door)
 
if (seat==0) and (door==0) then
</syntaxhighlight>
outputChatBox("You are leaving the drivers seat.")
end
end
addEventHandler("onClientVehicleStartExit", getRootElement(), exitingVehicle)</syntaxhighlight>


==See Also==
==See Also==
Line 28: Line 30:
===Client event functions===
===Client event functions===
{{Client_event_functions}}
{{Client_event_functions}}
[[es:onClientVehicleStartExit]]

Latest revision as of 13:03, 29 November 2020

This event is triggered when a ped or player starts exiting a vehicle. Once the exiting animation completes, onClientVehicleExit is triggered.

Parameters

ped thePed, int seat, int door
  • thePed: the ped who started exiting the vehicle.
  • seat: the number of the seat that the ped was sitting on.
  • door: the number of the door that the ped is using to leave.

Source

The source of this event is the vehicle that the ped started to exit.

Example

This example outputs to the player that he's leaving the drivers seat.

function exitingVehicle(player, seat, door)
	if (seat==0) and (door==0) then
		outputChatBox("You are leaving the drivers seat.")
	end
end
addEventHandler("onClientVehicleStartExit", getRootElement(), exitingVehicle)

See Also

Client vehicle events


Client event functions