
Documentation
Integrate the script with your server and connect it to your existing systems using the available developer API and events.
idany |
Any non-nil value — used later to remove it |
| vector3 | table |
|
| string | Optional text shown under the icon |
| table | Partial style override, merged over the player's active style |
Returns
booleanExample:
exports['qs-waypoint']:AddWaypoint('bank_heist', vector3(253.1, 225.3, 101.8), {
label = 'Drop-off point',
style = { color = { 255, 0, 0 }, routeColor = { 255, 0, 0 }, beam = true },
})Only pass the fields you want to change — everything else keeps the player's own style, so your waypoint still respects their preferences.
iconcannot be overridden per waypoint. There is a single icon texture, taken from the active profile.
The 1.x form is still supported: { color = { r, g, b, a } } is translated into color + markerColor + opacity.
Removes a waypoint previously added by export.
exports['qs-waypoint']:RemoveWaypoint(id)Parameters
Parameter | Type | Description |
|---|---|---|
| any | The id used when adding it |
Returns
booleanReturns true if that id existed.
Removes every waypoint added by export.
exports['qs-waypoint']:ClearWaypoints()Returns
trueIt does not touch the player's map waypoint — only the ones your scripts added.
Returns a read-only copy of the active export waypoints, indexed by id.
local waypoints = exports['qs-waypoint']:GetWaypoints()Returns
{ [id] = { coords = vector3, label = string|nil } }Switches the player to one of their saved profiles, by id or by name.
exports['qs-waypoint']:SetProfile(idOrName)Parameters
Parameter | Type | Description |
|---|---|---|
| number | string | Profile id or name |
Returns
booleanReturns false if the profile does not exist. The change is persisted on the client.
Returns the player's saved profiles.
local profiles = exports['qs-waypoint']:GetProfiles()Returns
{ { id = ..., name = ... }, ... }Any field of the style can be passed in options.style. The most useful ones for a scripted waypoint:
Field | Effect |
|---|---|
| Icon appearance |
| Route arrows |
| 3D marker |
| Vertical beam at the destination |
| Ground ring |
| Visibility range |
Values are clamped to their valid range, so an out-of-range number is pulled back to the limit rather than causing an error.
exports['qs-waypoint']:AddWaypoint('mission_objective', targetCoords, {
label = 'Objective',
style = { color = { 255, 180, 0 }, beam = true },
})exports['qs-waypoint']:RemoveWaypoint('mission_objective')for i, coords in ipairs(deliveryPoints) do
exports['qs-waypoint']:AddWaypoint('delivery_' .. i, coords, {
label = ('Delivery %d'):format(i),
})
endThen clean them all up at once:
exports['qs-waypoint']:ClearWaypoints()Example: switching the player to a themed profile while on duty.
if exports['qs-waypoint']:SetProfile('Police') then
-- profile applied
endfor id, data in pairs(exports['qs-waypoint']:GetWaypoints()) do
print(id, data.label, data.coords)
end