FearlessStudios

AddPoint

Server export to add a handbook interaction point

AddPoint

Adds an interaction point to data/handbook.json, normalizes the saved data, and refreshes points for online players.

Usage

server.lua
local result = exports["FS-Handbook"]:AddPoint({
  name = "City Hall Clerk",
  mode = "npc",
  coords = { x = -545.0, y = -204.0, z = 38.0, w = 210.0 },
  radius = 2.0,
  interaction = "gta",
  npc = {
    model = "s_m_m_highsec_01",
    animation = {
      dict = "amb@world_human_clipboard@male@idle_a",
      name = "idle_c",
      flags = 1,
    },
  },
})

if not result.ok then
  print(result.error)
  return
end

print(("Added point %s"):format(result.point.id))

Parameters

Prop

Type

Returns

Prop

Type