Skip to content

world.getPlayerMarkerSettings

Reads how players show on each other’s radar: the marker mode, the range, and the blip size. The settings start from server.ini and can change while the server runs.

Renamed in 0.28 from world.markerSettings, world.markerMode, world.markerRadius and world.markerSize; see renamed names.

world.getPlayerMarkerSettings(): PlayerMarkerSettings
world.getPlayerMarkerMode(): PlayerMarkerMode
world.getPlayerMarkerRadius(): number | null
world.getPlayerMarkerRadarScale(): number

The last three read one field of the first.

None.

A PlayerMarkerSettings:

Field Type Description
mode "off" | "global" | "streamed" See modes.
radius number or null How far away, in metres, a player’s marker shows; a player exactly on the radius counts. null: no limit.
radarScale number The blip size, the game’s own: 1 (default) to 16.
Mode What players see
off No player markers.
global A marker at each player’s position as the server knows it, at any distance within radius.
streamed A marker on each player the viewer’s game shows: in the same interior and within 350 m, and within radius.

In every mode a marker shows only for a living player in the same interior as the viewer, and your playerMarkerVisibilityRequest can still hide it.

gamemodes/my-mode.ts
import { server, world } from "nativemp";
server.on("playerConnected", ({ player }) => {
const { mode, radius, radarScale } = world.getPlayerMarkerSettings();
server.log(`${player.name}: ${mode}, ${radius === null ? "no limit" : `${radius} m`}, scale ${radarScale}`);
});

Without settings the mode is streamed and the radius 100. In server.ini:

server.ini
[server]
marker_mode=global
marker_radius=unlimited
marker_size=2

or on the command line: --marker-mode global --marker-radius unlimited --marker-size 2.