M MY Multiplayer: Wiki
Side
Kind

onElementColShapeLeave

ServerEvent

Fired on a player, ped, vehicle or object when it leaves a collision shape.

addEventHandler("onElementColShapeLeave", root, function(element colShape, bool matchingDimension) … end)

Handler parameters

NameTypeDescription
colShapeelementThe collision shape it left.
matchingDimensionboolWhether the element is in the same dimension as the shape.

Source

The element that left.

It fires right after onColShapeLeave, unless a handler of that one destroyed the element.

Example

addEventHandler("onElementColShapeLeave", root, function(colShape)
    if colShape == safeZone and getElementType(source) == "vehicle" then
        setElementFrozen(source, false)
    end
end)

See also