Loading content...
Marker
A DrawMarker wrapper with sensible defaults — pass a config table, call it each frame.
A DrawMarker wrapper with sensible defaults — pass a config table, call it each frame.
lib.marker(data) draws one marker for the current frame with sane defaults (vertical cylinder,
scale 1, semi-transparent white). Call it every frame inside a ticking thread to keep it visible.
CreateThread(function()
while true do
lib.marker({ coords = vector3(215.76, -810.12, 30.73) })
Wait(0)
end
end)| Field | Type | Default | Description |
|---|---|---|---|
coords | vector3 | required | Marker position (Z sits at the cylinder base, not its center). |
type | number | 1 | Marker type — 1 cylinder, 2 down arrow, 27 ring cone, 28 flat circle. |
colour | { r, g, b, a } | white, a = 100 | RGBA 0..255. Default is semi-transparent. |
scale | vector3 | vec3(1, 1, 1) | XYZ size — it's a vector3, not a number. |
bobUpAndDown | boolean | false | Up/down bobbing animation. |
faceCamera | boolean | false | Billboard toward the camera. |
rotate | boolean | false | Auto-rotate around Z. |
dir / rot | vector3 | vec3(0, 0, 0) | Direction / rotation. |
textureDict / textureName | string | — | Optional texture override. |
drawOnEnts | boolean | false | Draw on top of entities. |
coordsvector3typenumber11 cylinder, 2 down arrow, 27 ring cone, 28 flat circle.colour{ r, g, b, a }a = 1000..255. Default is semi-transparent.scalevector3vec3(1, 1, 1)vector3, not a number.bobUpAndDownbooleanfalsefaceCamerabooleanfalserotatebooleanfalsedir / rotvector3vec3(0, 0, 0)textureDict / textureNamestringdrawOnEntsbooleanfalselocal target = vector3(215.76, -810.12, 30.73)
local red = { r = 255, g = 0, b = 0, a = 200 }
CreateThread(function()
while true do
Wait(0)
if #(GetEntityCoords(cache.ped) - target) < 25.0 then
lib.marker({
type = 27,
coords = target,
scale = vector3(2.0, 2.0, 1.5),
colour = red,
bobUpAndDown = true,
})
end
end
end)A marker only exists for the frame it's drawn — no call this frame, no marker. Always draw inside a
CreateThread + while true + Wait(0) loop, and gate it behind a distance check so you don't draw
50 markers across the whole map. coords is mandatory (passing nil crashes on data.coords.x), and
the default alpha is 100/255 — bump it to 200+ for a clearly visible marker.