- Documentation
- Client events
- onClientColShapeHit
Event
onClientColShapeHit
An element entered a client-created shape. Attach the handler to that shape or to root (the event does not pass through parents).
Handler
addEventHandler("onClientColShapeHit", root, function(theElement, matchingDimension) ... end)Parameters
theElementelement- The element.
matchingDimensionbool- Always
true.
Source
source is the shape.
Example
local zone = createColSphere(2495, -1687, 13.5, 10)
addEventHandler("onClientColShapeHit", zone, function(el)
if el == localPlayer then outputChatBox("Jesteś przy domu CJ") end
end)
See also
onClientColShapeLeaveAn element left a client-created shape.createColSphereCreates a sphere-shaped collision zone. The zone is invisible; when a player enters or leaves it,onColShapeHit/onColShapeLeavefire (server) oronClientColShapeHit/onClientColShapeLeave(client). A zone can be attached to an element (attachElements) so it moves with it.