OnClientPlayerVehicleEnter: Difference between revisions
Jump to navigation
Jump to search
Xthepr0mise (talk | contribs) |
Xthepr0mise (talk | contribs) |
||
Line 27: | Line 27: | ||
addEventHandler("onClientPlayerVehicleEnter",getRootElement(),checkVehicles) | addEventHandler("onClientPlayerVehicleEnter",getRootElement(),checkVehicles) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
</section> | |||
==See Also== | ==See Also== |
Revision as of 10:33, 17 January 2012
Script Example Missing Event OnClientPlayerVehicleEnter needs a script example, help out by writing one. | |
Before submitting check out Editing Guidelines Script Examples. |
This event is fired when a player enters a vehicle.
Parameters
vehicle theVehicle, int seat
- vehicle: 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
Click to collapse [-]
Client scriptfunction checkVehicles() local theVehicle = source if (getVehicleName(theVehicle)) == "Banshee" then outputChatBox("You entered a Banshee!") else outputChatBox("This isn't a Banshee!") end end addEventHandler("onClientPlayerVehicleEnter",getRootElement(),checkVehicles)
See Also
Client player events
- onClientPlayerChangeNick
- onClientPlayerChoke
- onClientPlayerDamage
- onClientPlayerHeliKilled
- onClientPlayerHitByWaterCannon
- onClientPlayerJoin
- onClientPlayerPickupHit
- onClientPlayerPickupLeave
- onClientPlayerQuit
- onClientPlayerRadioSwitch
- onClientPlayerSpawn
- onClientPlayerStealthKill
- onClientPlayerStuntFinish
- onClientPlayerStuntStart
- onClientPlayerTarget
- onClientPlayerVehicleEnter
- onClientPlayerVehicleExit
- onClientPlayerVoicePause
- onClientPlayerVoiceResumed
- onClientPlayerVoiceStart
- onClientPlayerVoiceStop
- onClientPlayerWasted
- onClientPlayerWeaponFire
- onClientPlayerWeaponSwitch
Client event functions
- triggerLatentServerEvent
- triggerServerEvent
- Shared
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- wasEventCancelled