- Documentation
- Server events
- onMarkerHit
Event
onMarkerHit
An element entered a marker.
Handler
addEventHandler("onMarkerHit", root, function(hitElement, matchingDimension) ... end)Parameters
hitElementelement- The element.
matchingDimensionbool- Whether in the same dimension.
Source
source is the marker.
Example
local shop = createMarker(2500, -1660, 12.5, "cylinder", 1.5, 255, 122, 34)
addEventHandler("onMarkerHit", shop, function(el, dim)
if dim and getElementType(el) == "player" then outputChatBox("Sklep: wpisz /kup", el) end
end)
See also
onMarkerLeaveAn element left a marker.createMarkerCreates a marker in the world: a coloured cylinder to step into (e.g. a job entrance), an arrow above a spot, a corona or a ring. When a player enters it, the server firesonMarkerHitwith the player as the first argument, andonMarkerLeaveon exit. Types:"cylinder","checkpoint","arrow","corona"(a soft ball of light facing the camera),"ring". The size is the diameter in metres.