How Integrations Work#
Waypoint has nothing to detect and nothing to bridge. It does not talk to a framework, an inventory or a target script, so it behaves identically on every server. It connects to the rest of your server in two ways only:
Way in | Used by | Code needed |
|---|---|---|
The map waypoint | The pause map, phones, tablets, dispatch, job and GPS scripts — anything that sets the regular waypoint. | None. |
The exports | Your own scripts, for points that live alongside the map waypoint: several at once, with labels and their own colours. | One line per point. |
Phones, Dispatch and GPS Scripts#
Waypoint styles the game's own map waypoint, wherever it came from. A phone's maps app, a police dispatch "set GPS" button, a taxi job, a garage "locate vehicle" — any script that calls SetNewWaypoint or places the waypoint on the map gets the player's icon, distance, route arrows and marker automatically, with no changes to either script.
-- In any client script — Waypoint picks this up on its own
SetNewWaypoint(215.8, -810.1)This is the simplest integration and the right one when the destination should replace the player's current one, the way a GPS does. When it should not — a delivery while the player already has their own waypoint set, or several points at once — use the exports below.
Marking Points From Your Own Scripts#
Points added with AddWaypoint are drawn next to the player's map waypoint, never instead of it, and stay until your script removes them. The exports are client-side, so they are called from a client script. A delivery job, for example:
-- client.lua of your job
local dropoff = vector3(-1037.6, -2737.8, 20.2)
-- On accepting the job
exports['qs-waypoint']:AddWaypoint('mydelivery:dropoff', dropoff, {
label = 'Drop-off',
})
-- On arrival, or if the job is cancelled
exports['qs-waypoint']:RemoveWaypoint('mydelivery:dropoff')When the decision is made on the server — a dispatch call, a mission handed out by an NPC — send it to the player's client with an event and add the point there:
-- server.lua
TriggerClientEvent('mydispatch:mark', officerId, callId, coords, 'Robbery in progress')
-- client.lua
RegisterNetEvent('mydispatch:mark', function(callId, coords, label)
exports['qs-waypoint']:AddWaypoint('mydispatch:' .. callId, coords, {
label = label,
style = { color = { 255, 60, 60 }, markerColor = { 255, 60, 60 }, beam = true },
})
end)
RegisterNetEvent('mydispatch:clear', function(callId)
exports['qs-waypoint']:RemoveWaypoint('mydispatch:' .. callId)
end)Prefix your ids with your resource's name. Every script shares one list of points, so two resources using the id
1would replace each other's waypoint. For the same reason, prefer removing your own ids overClearWaypoints, which removes everyone's.
Points added this way live in the client's memory only: they are gone after the player reconnects or the resource restarts. A job that must survive that should add its point again when the player loads in.
A Colour of Its Own#
By default a script waypoint is drawn in the player's active style, so it matches everything else they see. Pass style to change only what you name — every other value still comes from the player's profile:
-- Red for danger, with a light beam over the rooftops
exports['qs-waypoint']:AddWaypoint('myheist:vault', coords, {
label = 'Vault',
style = {
color = { 255, 60, 60 },
markerColor = { 255, 60, 60 },
beam = true,
beamColor = { 255, 60, 60 },
beamHeight = 30.0,
},
})Any field from the Styling Reference can be overridden this way, with two exceptions:
The icon — every waypoint shows the icon of the player's active profile. A script can recolour and resize it, not swap it.
The route — the arrows belong to the player and are always drawn in their own style.
Switching a Player's Style#
A script can switch the player to one of their own saved profiles, by name. A police resource can move officers onto a style called Police when they go on duty — if they made one:
RegisterNetEvent('myjob:dutyChanged', function(onDuty)
if onDuty then
exports['qs-waypoint']:SetProfile('Police')
else
exports['qs-waypoint']:SetProfile('Default')
end
end)SetProfile returns false and changes nothing when the player has no profile with that name, so it is safe to call blindly. GetProfiles lists what they have. Scripts can choose between the player's profiles but never create or edit one — the style is always the player's own.
Languages#
English and Spanish ship in translations.lua, and any other language is one table of texts. See Usage → Translations.



