ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server events
  3. onMarkerHit

Event

onMarkerHit

ServerMarkersIdentical to MTA:SA

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