M MY Multiplayer: Wiki
Side
Kind

onColShapeLeave

ServerEvent

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

addEventHandler("onColShapeLeave", root, function(element hitElement, bool matchingDimension) … end)

Handler parameters

NameTypeDescription
hitElementelementThe element that left.
matchingDimensionboolWhether the element is in the same dimension as the shape.

Source

The collision shape (colshape).

Example

addEventHandler("onColShapeLeave", zone, function(leftElement, matchingDimension)
    if getElementType(leftElement) == "player" then
        outputDebugString(getPlayerName(leftElement) .. " left the zone")
    end
end)
NoteAn element destroyed inside the shape leaves it without firing this event.

See also