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
| Name | Type | Description |
|---|---|---|
| hitElement | element | The element that left. |
| matchingDimension | bool | Whether 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.