FearlessStudios

Configure

How to set up and configure the FS-SpawnSelector resource

Define spawn points and choose automatic or manual opening.

Quick start

  1. Add FS-SpawnSelector to your resources folder.
  2. Edit config.lua to define spawn points.
  3. Restart the resource to load your changes.

Basic setup

config.lua
Config = {}

-- Allow players to reopen the spawn menu with /spawnselector
Config.enableSpawnSelectorCommand = true

-- false: open automatically when a player connects (if no last location is saved)
-- true: require a manual trigger via export or event
Config.manuallyTrigger = false

Config.Spawns = {
  {
    id = "sandy_airfield",
    name = "Sandy Shores Airfield",
    description = "Out in the desert, near the airstrip.",
    coords = vector3(1658.7671, 3258.2312, 40.7533),
    heading = 0.0,
    image = "sandy_airfield.png",
    color = "#29B6F6",
    category = "Civilian Spawns",
    accessControl = {
      enabled = false,
      permission = "fs.spawn.sandy_airfield"
    }
  }
}

Images

Place spawn images in nui/images/. The filename must match the image value.

ACE permissions

Enable access control on a spawn with:

config.lua
accessControl = {
  enabled = true,
  permission = "fs.spawn.sandy_airfield"
}

Grant the permission in server.cfg:

server.cfg
add_ace group.admin fs.spawn.sandy_airfield allow

Commands

  • /spawnselector opens the UI when Config.enableSpawnSelectorCommand = true.

Exports

See Exports for client exports.