ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Client events
  3. onClientMarkerHit

Event

onClientMarkerHit

ClientBrowserIdentical to MTA:SA

An element entered a marker, in this game. Works for markers from the server and ones created on the client. Players, vehicles, peds, objects, pickups and other markers are checked every 100 ms. A checkpoint marker is a circle with no height limit, the other types are a sphere with a radius equal to the marker size.

Handler

addEventHandler("onClientMarkerHit", root, function(hitElement, matchingDimension) ... end)

Parameters

hitElementelement
The element that entered.
matchingDimensionbool
Whether the element and the marker are in the same dimension.

Source

source is the marker.

Example

local shop = createMarker(2500, -1660, 12.5, "cylinder", 1.5, 255, 122, 34)
addEventHandler("onClientMarkerHit", shop, function(el, dim)
    if el == localPlayer and dim then outputChatBox("Sklep: wpisz /kup") end
end)

See also