From Multi Theft Auto: Wiki
Revision as of 02:56, 27 September 2018 by Botder (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This event is triggered when an player or vehicle element leaves the area of a colshape.


colshape theColShape, bool matchingDimension


The source of this event is the player or vehicle that left colshape.


This example prints type of the element which left the created colshape to chatbox.

colArea = createColCircle( 1400.0, -700.0, 5.0 ) -- create the colshape

function elementColShapeLeave( colShapeLeft )
    if colShapeLeft == colArea then -- if element left the created colshape
        outputChatBox( getElementType( source ) .. " left the colCircle!" ) -- print the type of the element to chatbox
addEventHandler( "onElementColShapeLeave", getRootElement(), elementColShapeLeave ) -- add a handler function for the event

See Also

Element events

Event functions