setGpsDisabledZoneAtIndex

SET_GPS_DISABLED_ZONE_AT_INDEX0xD0BC1C6FB18EE154

The GTA V native SET_GPS_DISABLED_ZONE_AT_INDEX of the PATHFIND namespace, as LS:MP client scripts call it: the global function setGpsDisabledZoneAtIndex, in JavaScript and in Lua.

SignatureJavaScript
setGpsDisabledZoneAtIndex(
  x1: number,
  y1: number,
  z1: number,
  x2: number,
  y2: number,
  z2: number,
  index: number
): void
SignatureLua
setGpsDisabledZoneAtIndex(
  x1: number,
  y1: number,
  z1: number,
  x2: number,
  y2: number,
  z2: number,
  index: integer
)

Usage

JavaScript
setGpsDisabledZoneAtIndex(x1, y1, z1, x2, y2, z2, index);
Lua
setGpsDisabledZoneAtIndex(x1, y1, z1, x2, y2, z2, index)

Three consecutive numbers can be given as one vector: { x, y, z } (or [x, y, z]) in JavaScript, a Vector3 in Lua.

JavaScript · with vectors
setGpsDisabledZoneAtIndex(pos1, pos2, index);
Lua · with vectors
setGpsDisabledZoneAtIndex(pos1, pos2, index)

Parameters

ParameterTypeJavaScriptLua
x1floatnumbernumber
y1floatnumbernumber
z1floatnumbernumber
x2floatnumbernumber
y2floatnumbernumber
z2floatnumbernumber
indexintnumberinteger

Returns

Nothing. In JavaScript the call evaluates to undefined.

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Disables the GPS route displayed on the minimap while within a certain zone (area). When in a disabled zone and creating a waypoint, the GPS route is not shown on the minimap until you are outside of the zone. When disabled, the direct distance is shown on minimap opposed to distance to travel. Seems to only work before setting a waypoint.
You can clear the disabled zone with clearGpsDisabledZoneAtIndex.

Setting a waypoint at the same coordinate:
Disabled Zone: https://i.imgur.com/vsxkvjC.png
Enabled Zone (normal): https://i.imgur.com/OUZYLWL.png

Reference

Namespace
Pathfinding PATHFIND
In the game
void SET_GPS_DISABLED_ZONE_AT_INDEX(float x1, float y1, float z1, float x2, float y2, float z2, int index)
Hash
0xD0BC1C6FB18EE154

Open in the interactive natives reference