onClientElementColShapeHit
ClientEvent
Fired on a player, ped, vehicle or object when it enters a collision shape on this client.
addEventHandler("onClientElementColShapeHit", root, function(element colShape, bool matchingDimension) … end)
Handler parameters
| Name | Type | Description |
|---|---|---|
| colShape | element | The collision shape it entered. |
| matchingDimension | bool | Whether the element is in the same dimension as the shape. |
Source
The element that entered.
It fires right after onClientColShapeHit, unless a handler of that one destroyed the element.
Example
addEventHandler("onClientElementColShapeHit", localPlayer, function(colShape, matchingDimension)
if matchingDimension then
outputDebugString("Entered a zone")
end
end)