OnClientVehicleStartEnter: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 24: | Line 24: | ||
==Example== | ==Example== | ||
This example outputs if the player is sitting in the drivers seat. | This example outputs if the player is sitting in the drivers seat. (TESTED!) | ||
<syntaxhighlight lang="lua">addEventHandler("onClientVehicleStartEnter",root,function(player,seat,door) | <syntaxhighlight lang="lua">addEventHandler("onClientVehicleStartEnter",root,function(player,seat,door) | ||
if(seat==0)and(door==0)then | if(seat==0)and(door==0)then |
Revision as of 21:07, 27 April 2012
This event is triggered when a player starts entering a vehicle. Once the entering animation completes, onClientVehicleEnter is triggered.
Parameters
player thePlayer, int seat, int door
- thePlayer: the player that just started entering a vehicle.
- seat: the number of the seat he is going to sit on.
- door: An integer of which door the player used (0-3). 0 is driver side door, 1 is front passenger, 2 is back left, 3 is back right.
Source
The source of this event is the vehicle the player is entering.
Example
This example outputs if the player is sitting in the drivers seat. (TESTED!)
addEventHandler("onClientVehicleStartEnter",root,function(player,seat,door) if(seat==0)and(door==0)then outputChatBox("You are going to sit in the drivers seat.",player) end end)
See Also
Client vehicle events
- onClientTrailerAttach
- onClientTrailerDetach
- onClientVehicleCollision
- onClientVehicleDamage
- onClientVehicleEnter
- onClientVehicleExit
- onClientVehicleExplode
- onClientVehicleNitroStateChange
- onClientVehicleRespawn
- onClientVehicleStartEnter
- onClientVehicleStartExit
- onClientVehicleWeaponHit
Client event functions
- triggerLatentServerEvent
- triggerServerEvent
- Shared
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- wasEventCancelled