OnClientVehicleNitroStateChange: Difference between revisions
Jump to navigation
Jump to search
Line 13: | Line 13: | ||
==Example== | ==Example== | ||
This example | This example is showing short chat message on nitro state changing. | ||
<section name="Client" class="client" show="true"> | <section name="Client" class="client" show="true"> | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> |
Revision as of 22:03, 26 April 2013
This event gets triggered when nitro state is changing.
Parameters
bool state
- state: current state of nitro
Source
The source of this event is the player vehicle.
Example
This example is showing short chat message on nitro state changing.
Click to collapse [-]
Clientfunction nitroState(state) if (state == true) then outputChatBox("You starts using nitro...", 150, 255, 150, true) elseif (state == false) then outputChatBox("Nitro fuel runs empty...", 255, 150, 150, true) end end addEventHandler("onClientVehicleNitroStateChange", getRootElement(), nitroState)
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