OnClientPlayerStuntFinish: Difference between revisions
Jump to navigation
Jump to search
Line 27: | Line 27: | ||
addEventHandler( "onClientPlayerStuntFinish", getRootElement( ), | addEventHandler( "onClientPlayerStuntFinish", getRootElement( ), | ||
function ( stuntType, stuntTime, distance ) | function ( stuntType, stuntTime, distance ) | ||
outputChatBox( "You finished stunt: " .. stuntType ..", Time: " .. stuntTime .. ", Distance: " .. tostring( distance ) ); | outputChatBox( "You finished stunt: " .. stuntType ..", Time: " .. tostring( stuntTime ) .. ", Distance: " .. tostring( distance ) ); | ||
end | end | ||
); | ); |
Revision as of 19:20, 5 October 2009
This event is triggered whenever the local player finishes a vehicle stunt.
Parameters
string stuntType, int stuntTime, float stuntDistance
- stuntType: the type of stunt the player just performed. Valid types are:
- 2wheeler
- wheelie
- stoppie
- stuntTime: the number of miliseconds the stunt lasted.
- stuntDistance: the distance traveled while doing the stunt.
Source
The source of this event is the local player.
Example
This is a simple stunt script which tells player what stunt he/she started and finished, time the stunt taken to perform and distance travelled while stunting.
addEventHandler( "onClientPlayerStuntFinish", getRootElement( ), function ( stuntType ) outputChatBox( "You started stunt: " .. stuntType ); end ); addEventHandler( "onClientPlayerStuntFinish", getRootElement( ), function ( stuntType, stuntTime, distance ) outputChatBox( "You finished stunt: " .. stuntType ..", Time: " .. tostring( stuntTime ) .. ", Distance: " .. tostring( distance ) ); end );
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