Skip to content

vehicleMarkerAppearanceRequest

Asks your gamemode how an empty vehicle shows on everyone’s radar: whether it shows at all, and in which color. It is asked once per vehicle, and again after your gamemode reloads or the default changes. Every vehicle is asked about: the story’s parked vehicles, your own, players’ own, the map’s parked cars, and traffic once its driver has left. Every player sees the same marker; each game shows the nearest 64.

Renamed in 0.28 from vehicleMarkerRequest; see renamed names.

server.on("vehicleMarkerAppearanceRequest", ({ vehicle, isPersistent, defaultVisible, defaultColorRgba }) =>
VehicleMarkerAppearanceDecision | Promise<VehicleMarkerAppearanceDecision>)
Name Type Description
vehicle Entity The vehicle.
isPersistent boolean false for an ambient vehicle: one of the map’s parked cars, or traffic its driver left.
defaultVisible boolean The server’s default (vehicle_markers in server.ini, see world.areVehicleMarkersEnabled).
defaultColorRgba number The default color, 0xA0A0A0FF (grey).
  • false hides the marker. Any handler’s false wins over the others.
  • true shows it.
  • A VehicleMarkerAppearance, { visible?, colorRgba? }, sets those fields; several handlers apply in the order you registered them.
  • Nothing keeps the default.

See how decisions work.

Only persistent vehicles on the radar, and police cars in blue.

gamemodes/my-mode.ts
import { server } from "nativemp";
server.on("vehicleMarkerAppearanceRequest", ({ vehicle, isPersistent }) => {
if (!isPersistent) return false;
if (vehicle.model === 596) return { colorRgba: 0x3366CCFF };
});