Skip to content

lx-navigation Installation

Install lx-navigation on its own when an LX product or your own client resource needs route sessions, GTA road-node pathing, turn guidance, or the driver HUD. Advanced Bus Job buyers should follow the product installation guide.

lx-navigation has no framework, database, ox_lib, oxmysql, or inventory dependency.

The consuming resource must call its client exports correctly. In particular, route progression, arrival detection, and rerouting require continued calls to Tick.

  1. Download lx-navigation from your Cfx.re account.
  2. Place it in your resources folder without renaming it:
resources/
[lx]/
lx-navigation/
  1. Start it before any resource that uses its exports:
ensure lx-navigation
ensure your-navigation-consumer

The production HUD is already built in ui/dist. Node.js, npm, and the development UI source are not required on a production server.

Declare the dependency in the consumer’s fxmanifest.lua:

dependency 'lx-navigation'

Start a route from client Lua and retain the returned session ID:

local routeId = exports['lx-navigation']:StartRoute({
profile = 'bus',
label = 'Metro Loop',
destination = vec3(303.9, -765.2, 28.3),
hud = true,
})

Continue calling Tick(routeId) from an appropriately paced client loop or your existing mission update flow. Stop the route during mission cleanup:

exports['lx-navigation']:StopRoute(routeId)

See the complete client exports reference before integrating route control.

  • ui/dist/index.html exists
  • Resource starts without F8 or server-console errors
  • Starting a test route draws the GPS route and shows the HUD
  • Tick updates distance and arrival state
  • StopRoute removes the route and HUD
  • The bottom-right FiveM “Loading game” indicator clears after start/restart

Keep the resource folder name lx-navigation and do not replace its production ui_page with a localhost URL.