From Multi Theft Auto: Wiki
Revision as of 17:39, 15 May 2010 by Ca11um (talk | contribs) (Typo in the event handler in example.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This event is triggered whenever the local player starts doing a vehicle stunt.


string stuntType
  • stuntType: the type of stunt the player is starting to perform. Valid types are:
    • 2wheeler
    • wheelie
    • stoppie


The source of this event is the local player.


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( "onClientPlayerStuntStart", getRootElement( ),
    function ( stuntType )
        outputChatBox( "You started stunt: " .. stuntType );

addEventHandler( "onClientPlayerStuntFinish", getRootElement( ),
    function ( stuntType, stuntTime, distance )
        outputChatBox( "You finished stunt: " .. stuntType ..", Time: " .. tostring( stuntTime ).. ", Distance: " .. tostring( distance ) );

See Also

Client player events

Client event functions