Skip to content

GameMap

The pause menu's map. server.map is everyone's (players joining later get it too); player.map is one player's. Client scripts have their own (sagl.map), apart.

setMarker(id, { x, y, icon?, color?, label? }) Adds or moves a marker. icon: 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. image: PNG/JPG bytes or a path on the server (sent each time); file: a client file (cached). Higher layer on top.
removeOverlay(id)
setWorld(visible, background?) Hide the game's map (an interior map, GTA V style) on a plain background.

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

server.map.setMarker("bank", { x: 1462, y: -1012, icon: 52, label: "Bank" });
player.map.setWorld(false, "#000000");
player.map.setOverlay("floor", { x1: 1400, y1: -1050, x2: 1520, y2: -980, file: "maps/bank.png" });