OnClientPlayerVehicleExit: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
 
(The event is complete now, so there is no need to include it in that category)
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[Category:Incomplete Event]]
{{Client event}}
 
__NOTOC__  
__NOTOC__  
This event is blahblah and is used for blahblah.
This event is triggered when a player exits a vehicle.


==Syntax==  
==Parameters==  
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
void onClientPlayerVehicleExit ( vehicle theVehicle, int seat )
vehicle theVehicle, int seat
</syntaxhighlight>  
</syntaxhighlight>
*'''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]] that exited the vehicle.


==Example==  
==Example==  
This example does...
This example outputs a chat box message with player's name and vehicle name when someone leave vehicle.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
--This line does...
addEventHandler("onClientPlayerVehicleExit", getRootElement(),
blabhalbalhb --abababa
 
--This line does this...
function (vehicle, seat)
mooo
 
local vehicleName = getVehicleName(vehicle)
outputChatBox("Player " .. getPlayerName(source) .. " has left the " .. vehicleName)
 
end)
</syntaxhighlight>
</syntaxhighlight>
==See Also==
===Client player events===
{{Client_player_events}}
===Client event functions===
{{Client_event_functions}}

Revision as of 11:46, 17 January 2016

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

Client player events


Client event functions