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
| Name | Type | Description |
|---|---|---|
| colShape | element | The collision shape it left. |
| matchingDimension | bool | Whether 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)