# Configuration

<details>

<summary>Basic Configuration</summary>

### Basic Configuration

All configuration options are located inside:

```
config.lua
```

***

### What your config looks like.

```
-- =========================================================================
-- ||                            NX-ADMIN                                 ||
-- ||                    Advanced Server Management                       ||
-- ||                                                                     ||
-- ||              Support & Updates: discord.gg/nxscripts                ||
-- =========================================================================

Config = {}

-- ==========================================
-- GENERAL SETTINGS
-- ==========================================

-- The coordinates your staff will be teleported to when using the
-- "Admin Center" quick action button in the top bar.
-- Change this to a location on your server (e.g. a staff room or PD).
-- Format: vector3(x, y, z)
Config.AdminCenter = vector3(-425.5651, 1123.4659, 325.8548)

-- The clothing/wardrobe script your server uses.
-- This ensures the "Clothing" admin action opens the correct menu.
-- Supported values:
--   "illenium"         → illenium-appearance
--   "fivem-appearance" → fivem-appearance
--   "esx_skin"         → esx_skin
-- Set to false to disable the clothing action entirely.
Config.ClothingType = "illenium"

-- Noclip base movement speed.
-- Default: 1.0 — Hold SHIFT for 3x speed, hold ALT for 1/3 speed.
-- Press ESC while in noclip to exit.
Config.NoclipSpeed = 1.0

-- ==========================================
-- SCREENSHOT WEBHOOK
-- ==========================================

-- A separate Discord webhook URL for screenshot uploads.
-- Screenshots taken via the admin action will be posted here.
-- Leave blank ("") to disable the screenshot action entirely.
-- How to create a webhook: Discord Channel Settings → Integrations → Webhooks → New Webhook → Copy URL
Config.ScreenshotWebhook = ""

-- ==========================================
-- DISCORD INTEGRATION (OPTIONAL)
-- ==========================================
-- Used to check a player's Discord roles when determining their staff rank.
-- If left blank, NX-Admin will fall back to ESX groups only.
-- NEVER share your bot token publicly or commit it to a public repo.

Config.Discord = {
    -- Your Discord Bot Token. Must start with "Bot " (e.g. "Bot MTQ0NTY3...")
    -- Create a bot at: https://discord.com/developers/applications
    -- Required intents: Server Members Intent
    BotToken = "Bot",

    -- The numeric ID of your Discord server.
    -- Enable Developer Mode in Discord → right-click your server → Copy Server ID
    GuildId = ""
}

-- ==========================================
-- COMMUNITY SERVICE
-- ==========================================
-- Community service forces rule-breakers to complete GPS tasks in a restricted zone.
-- Tasks persist through resource restarts and server crashes.
-- Weapons are disabled during the sentence.

Config.Comms = {
    -- The center coordinate of the community service zone.
    -- Players will be teleported here when their sentence begins.
    Location = vector3(-1818.6029, 2969.8296, 32.8100),

    -- Where the player is teleported when they complete all tasks naturally.
    ReleaseLocation = vector3(68.1103, -422.0325, 39.3078),

    -- Where the player is teleported when an admin ends their sentence early
    -- from the Management tab ("End Sentence" button).
    AdminReleaseLocation = vector3(425.76, -979.66, 30.71),

    -- How far (in meters) a player can walk from Config.Comms.Location
    -- before being teleported back. Keep this wide enough to cover all task waypoints.
    Radius = 40.0,

    -- The GPS waypoints players must walk to and "clean" during their sentence.
    -- Add or remove vector3 entries to customise the zone.
    Tasks = {
        vector3(-1818.60, 2969.82, 32.81),
        vector3(-1815.25, 2965.10, 32.81),
        vector3(-1822.40, 2972.65, 32.81),
        vector3(-1811.80, 2973.90, 32.81),
        vector3(-1825.15, 2963.20, 32.81),
        vector3(-1819.50, 2960.55, 32.81),
        vector3(-1816.05, 2978.00, 32.81),
        vector3(-1828.00, 2968.05, 32.81),
        vector3(-1810.00, 2967.50, 32.81),
        vector3(-1813.30, 2970.20, 32.81)
    },

    -- The rule violation options shown in the community service popup.
    -- label = displayed to staff | amount = number of tasks assigned
    -- Add, remove, or adjust these to match your server rules.
    Reasons = {
        { label = "VDM",               amount = 125 },
        { label = "RDM",               amount = 150 },
        { label = "FRP",               amount = 50  },
        { label = "Exploiting",        amount = 100 },
        { label = "Stealing PD Items", amount = 150 },
        { label = "Meta Gaming",       amount = 75  },
        { label = "Power Gaming",      amount = 75  },
        { label = "Combat Log",        amount = 150 },
        { label = "Test",              amount = 1   }
    }
}

-- ==========================================
-- STAFF PERMISSIONS
-- ==========================================
-- Controls exactly what each ESX group can access in the admin menu.
-- Set any node to false to hide that button/tab from that group entirely.
-- You can add custom groups (e.g. ['trialmod']) by copying an existing block.
-- Group names must match your ESX group names exactly (case-sensitive).

Config.AdminPerms = {
    UserGroups = {
        -- Set to true to use ESX group-based permissions (recommended).
        -- Set to false to disable permission checks — NOT recommended.
        enabled = true,

        groups = {

            -- SUPERADMIN — Full unrestricted access
            ['superadmin'] = {
                menu            = true,  -- Can open the admin menu
                ban             = true,  -- Access to Bans tab + ban/unban actions
                kick            = true,  -- Kick players
                teleport        = true,  -- Goto, Bring, Admin Center
                revive          = true,  -- Revive downed players
                heal            = true,  -- Heal players
                kill            = true,  -- Instantly kill players
                skin            = true,  -- Force open clothing menu
                noclip          = true,  -- Built-in noclip (press ESC to exit)
                spectate        = true,  -- Invisibly spectate players
                freeze          = true,  -- Freeze/unfreeze players
                setjob          = true,  -- Change player job and grade
                stats_tab       = true,  -- Server stats and economy overview
                vehicles_tab    = true,  -- Vehicles tab (spawn, give, remove, wipe)
                staffchat       = true,  -- Private staff chat
                reports_tab     = true,  -- View and manage player tickets
                comms           = true,  -- Send players to community service
                view_inventory  = true,  -- Read-only inventory viewer (cannot take items)
                items_tab       = true,  -- ox_inventory item spawner
                screenshot      = true,  -- Take client-side screenshots
                management_tab  = true,  -- Management dashboard (roster, group, wipes, bans)
                vehicles        = true,  -- Vehicle delete/wipe actions
            },

            -- ADMIN — Full access
            ['admin'] = {
                menu            = true,
                ban             = true,
                kick            = true,
                teleport        = true,
                revive          = true,
                heal            = true,
                kill            = true,
                skin            = true,
                noclip          = true,
                spectate        = true,
                freeze          = true,
                setjob          = true,
                stats_tab       = true,
                vehicles_tab    = true,
                staffchat       = true,
                reports_tab     = true,
                comms           = true,
                view_inventory  = true,
                items_tab       = true,
                screenshot      = true,
                management_tab  = true,
                vehicles        = true,
            },

            -- MOD — Restricted access
            -- Cannot ban, change jobs, spawn items/vehicles, or access management.
            ['mod'] = {
                menu            = true,
                ban             = false, -- No ban access
                kick            = true,
                teleport        = true,
                revive          = true,
                heal            = true,
                kill            = true,
                skin            = true,
                noclip          = true,
                spectate        = true,
                freeze          = true,
                setjob          = false, -- Cannot change jobs
                stats_tab       = true,
                vehicles_tab    = false, -- No vehicles tab
                staffchat       = true,
                reports_tab     = true,
                comms           = true,
                view_inventory  = true,
                items_tab       = false, -- No item spawner
                screenshot      = true,
                management_tab  = false, -- No management dashboard
                vehicles        = false, -- No vehicle delete/wipe
            }

        }
    }
}

-- ==========================================
-- DISCORD WEBHOOK LOGGING
-- ==========================================
-- Every admin action sends a colour-coded embed to your Discord webhook.
-- Use this to keep a full audit trail of everything your staff does in-game.

Config.Webhook = {
    -- Your Discord webhook URL.
    -- How to create one: Channel Settings → Integrations → Webhooks → New Webhook → Copy URL
    -- Leave blank ("") to disable all webhook logging.
    URL = "",

    -- Your server name. Shown in the footer of every webhook embed.
    ServerName = "My FiveM Server",

    -- Toggle individual action types on (true) or off (false).
    -- Set to false if you don't want that action logged (e.g. teleport).
    Log = {
        ban         = true,  -- Player banned
        unban       = true,  -- Player unbanned
        kick        = true,  -- Player kicked
        heal        = true,  -- Player healed
        revive      = true,  -- Player revived
        kill        = true,  -- Player killed
        freeze      = true,  -- Player frozen/unfrozen
        spectate    = true,  -- Admin started spectating
        teleport    = true,  -- Admin teleported (goto/bring)
        bring       = true,  -- Player brought to admin
        setjob      = true,  -- Player job changed
        comms       = true,  -- Player sent to community service
        comms_end   = true,  -- Community service ended early by admin
        comms_add   = true,  -- Community service tasks extended by admin
        item_spawn  = true,  -- Item spawned into player inventory
        vehicle     = true,  -- Vehicle given to player garage
        clear_inv   = true,  -- Player inventory wiped
        set_group   = true,  -- Player ESX group changed
        screenshot  = true,  -- Screenshot taken of player
        report      = true,  -- Player submitted a support ticket
        noclip      = true,  -- Admin toggled noclip
        veh_spawn   = true,  -- Admin spawned a vehicle
        veh_delete  = true,  -- Vehicle(s) deleted
        veh_remove  = true,  -- Vehicle removed from player garage
        clothing    = true,  -- Clothing menu forced open
        ban_evasion = true,  -- Banned player attempted to reconnect with a different account
    }
}

```

This sets the teleport location for the Admin Center quick action.

***

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://nx-scripts.gitbook.io/nx-scripts-docs/scripts/nx-admin-menu/configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
