onClientColShapeHit
ClientEvent
Fired when a player, ped, vehicle or object enters a collision shape on this client.
addEventHandler("onClientColShapeHit", root, function(element hitElement, bool matchingDimension) … end)
Handler parameters
| Name | Type | Description |
|---|---|---|
| hitElement | element | The element that entered. |
| matchingDimension | bool | Whether the element is in the same dimension as the shape. |
Source
The collision shape (colshape).
Example
local zone = createColSphere(2488.0, -1666.0, 13.3, 5)
addEventHandler("onClientColShapeHit", zone, function(hitElement, matchingDimension)
if hitElement == localPlayer and matchingDimension then
outputDebugString("You entered the shop")
end
end)NoteThe event fires in any dimension; check
matchingDimension.