Skip to content

Reference

Interaction points and blips ​

lua
-- Server: for every player. The server checks distance and job again.
RLX.AddPoint({
  id = "garage_pillbox", coords = { x = 215.8, y = -809.1, z = 30.7 }, radius = 2.0,
  text = "[E] Garage",                                  -- on-screen help inside the zone
  label3d = "Garage",                                   -- floating text (optional)
  marker = { type = 36, color = { r = 61, g = 139, b = 255, a = 160 }, rotate = true, offsetZ = 0.0 },
  job = "mechanic", onDuty = true, minGrade = 1,        -- optional
  onFoot = true,                                        -- on foot only (checked by the server too)
  events = true,                                        -- also "enter" and "exit"
}, function(source, action)
  if action == "press" then ... end
end)
RLX.RemovePoint("garage_pillbox")

RLX.AddBlip({ id = "garage_pillbox", coords = { x = 215.8, y = -809.1, z = 30.7 }, sprite = 357, color = 3, label = "Garage", job = "mechanic" })
RLX.AddBlip({ id = "red_zone", coords = { x = 200.0, y = -930.0, z = 30.7 }, radius = 150.0, color = 1, alpha = 120, label = "Zone" }) -- circle
RLX.AddBlip({ id = "suspect", entity = netId, sprite = 225, color = 1, players = { 3, 7 } })                             -- follows a vehicle, for 2 players
RLX.SetBlipSprite("garage_pillbox", 50)
RLX.RemoveBlip("garage_pillbox")

Server blips are real server blips (lsmp.createBlip): really deleted, sent to arriving players, as a circle (radius) or an area (width + height, rotation), attached to an entity (entity = netId), transparent (alpha), in a dimension (dimension), for a list of players (players). job (with onDuty, minGrade) restricts them to a job or a gang: the list of players who see them follows job changes, arrivals and departures.

On the client, the same functions create points for this player only: RLX.AddPoint(def, function(action) end). key picks the key (38 = E by default).

Client blips (RLX.AddBlip in a client script, for this player only) also take radius (a circle), alpha, flash (true, or milliseconds of flashing), pulse (a circle that breathes: true or milliseconds), route (GPS route, routeColor), priority and duration (milliseconds, then it goes away by itself). rlx_dispatch uses them for its calls.

Moving a point in game. A shop counter in a wall, a cloakroom where your map has none: stand where it should be and type /movepoint (the points within 60 m, closest first) or /movepoint <id>, then Move it here, Go to it or Put it back. The new place is kept across restarts (rlx storage pointMoves), applied over the resource's own coords, and the blip with the same id follows. Permission rlx.command.movepoint. Resources read the place in force with RLX.GetPointCoords(id); RLX.MovePoint(id, coords) (nil: back to the resource's place), RLX.GetPointsInRadius(coords, radius); event rlx:pointMoved (id, coords, reset).