SetGpsDisabledZoneAtIndex
DocsSetGpsDisabledZoneAtIndex(x1, y1, z1, x2, y2, z2, index)Description
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 CLEAR_GPS_DISABLED_ZONE_AT_INDEX.
Setting a waypoint at the same coordinate:
Disabled Zone: <https://i.imgur.com/P9VUuxM.png>
Enabled Zone (normal): <https://i.imgur.com/BPi24aw.png>
Parameters
| Name | Type | Description |
|---|---|---|
x1 | float | X coordinate of first vector. |
y1 | float | Y coordinate of first vector. |
z1 | float | Z coordinate of first vector. |
x2 | float | X coordinate of second vector. |
y2 | float | Y coordinate of second vector. |
z2 | float | Z coordinate of second vector. |
index | int | Index of zone. |
Quick Snippet: Get Coordinatesx1y1z1x2
x1y1z1x2Add this command to your client script to retrieve precise locations in-game.
-- Add this to your client.lua. Type /pos in-game to copy coords.
RegisterCommand('pos', function()
local ped = PlayerPedId()
local coords = GetEntityCoords(ped)
local heading = GetEntityHeading(ped)
local output = string.format("vector4(%.2f, %.2f, %.2f, %.2f)", coords.x, coords.y, coords.z, heading)
print(output)
TriggerEvent('chat:addMessage', { args = { '^4[COORD]^0', output } })
end)Returns
voidThis native does not return a value.