Skip to content

Map

sagl.map: the script's own markers and overlays on the pause menu's map, apart from the gamemode's (server.map, player.map).

The pause menu's map with markers and overlays

setMarker(id, { x, y, icon?, color?, label? }) Adds or moves a marker. icon is the game's radar sprite (1-63); 0 or none: a diamond in color.
removeMarker(id)
setOverlay(id, { x1, y1, x2, y2, image?, file?, opacity?, layer? }) An image over a world rectangle. file: a client file; image: base64 or a data: URI (up to 12 MB). Returns whether it loaded.
removeOverlay(id)
setWorld(visible, background?) Hide the game's map for a plain background, e.g. to show only an interior's floor plan, GTA V style.

Ids are 1-32 characters. Colours are 0xRRGGBBAA or "#RRGGBB[AA]".

sagl.map.setMarker("ammu", { x: 1368, y: -1279, icon: 6, label: "Ammu-Nation" });
sagl.map.setOverlay("hq", { x1: 1400, y1: -1800, x2: 1600, y2: -1600, file: "maps/hq.png", opacity: 0.9 });

// Inside a building: only its floor plan.
sagl.map.setWorld(false, "#000000");