onClientPlayerStuntStart | Multi Theft Auto: Wiki Skip to content

onClientPlayerStuntStart

Client-side
Server-side
Shared

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

Parameters

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

Source

element: The source of this event is the local player.

Code Examples

client

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.

function onClientPlayerStuntStart(stuntType)
outputChatBox("You started stunt: "..stuntType)
end
addEventHandler("onClientPlayerStuntStart", localPlayer, onClientPlayerStuntStart)
function onClientPlayerStuntFinish(stuntType, stuntTime, stuntDistance)
outputChatBox("You finished stunt: "..stuntType..", time: "..stuntTime..", distance: "..stuntDistance)
end
addEventHandler("onClientPlayerStuntFinish", localPlayer, onClientPlayerStuntFinish)

See Also