OnClientVehicleStartExit: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Added interwiki (ES))
m ("(TESTED!)" does not belong to the wiki, also, the code was wrong and doesn't match the Wiki standards - please be sure what you post.)
Line 17: Line 17:


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


==See Also==
==See Also==

Revision as of 18:13, 29 October 2012

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

Parameters

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

Source

The source of this event is the vehicle that the player 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