- Documentation
- Markers
Catalogue
Markers
All five marker types with in-game pictures: a cylinder to step into, a checkpoint, a ring, an arrow and a corona.
Your first marker
A marker is a coloured sign in the world. createMarker creates it: on the server every player sees it, in a client script only that player does. When a player enters the marker, the server fires onMarkerHit, and onMarkerLeave on exit.
local job = createMarker(2495.3, -1680.0, 12.6, "cylinder", 1.5, 255, 122, 34, 170)
addEventHandler("onMarkerHit", job, function(element, sameDimension)
if getElementType(element) == "player" and sameDimension then
outputChatBox("You started the courier job.", element, 255, 122, 34)
end
end)
Types
Pass the type as the fourth argument of createMarker and change it with setMarkerType. The size (setMarkerSize) is the diameter in metres, setMarkerColor sets the colour and alpha.

cylinderA cylinder standing on the ground. The usual choice for a job, shop or building entrance.
checkpointA checkpoint: a tall column of light visible from far away. Good for race tracks.
ringA glowing ring at the given height, always facing the camera. For example a plane track.
arrowA downward arrow above a spot, pointing at a place or a door.
coronaA corona: a bigger glowing ring above the spot, facing the camera. It has no solid shape, only the glow.| Type | Looks like | Typical use |
|---|---|---|
cylinder | cylinder on the ground | entrances, jobs, shops |
checkpoint | column of light | race tracks |
ring | glowing ring | plane and boat tracks |
arrow | downward arrow above a spot | doors, places to visit |
corona | glowing ring above the spot | a sign seen from far away |
Who is inside
isElementWithinMarker checks one element and getElementsWithinMarker returns every element in the marker. The server checks entering, so it also works for vehicles and peds, not only players.
setTimer(function()
for _, player in ipairs(getElementsWithinMarker(job)) do
if getElementType(player) == "player" then givePlayerMoney(player, 10) end
end
end, 5000, 0)