Admin Panel

Configuration

Every option in config.lua, with the comments from the file.

View in store

Everything is in config.lua (not encrypted, every option has a comment). Secrets go in server_config.lua. Commands are on the Commands page.

OptionDescription
Config.BridgeFramework, inventory, notify, vehicle keys, fuel, revive, housing, society - 'auto' detects them
Config.KeysDefault panel and quick menu keys (players can change them in GTA key bindings)
Config.AceRolesGive roles through ACE (the roles themselves are made in game Staff Roles)
Config.DiscordRole recheck interval, profile refresh, guild roles refresh
Config.BansBan length buttons, ban hardware tokens and IP, spread a ban to new identifiers of a player who tries to join
Config.Reports / Config.AnnouncementsReport cooldown, open reports per player, categories / announcement durations
Config.Logs / Config.StatsDays to keep, join and death logs / statistic sample intervals
Config.NoclipSpeed, Shift / Alt multipliers, mouse and controller sensitivity, camera field of view
Config.Esp / Config.NamesESP distances and colours / name tag distance
Config.MonitorTurn monitoring on / off, frame rate, STUN / TURN servers
Config.AreaArea tools radius
Config.Web / Config.BotWebsite and Discord bot
Config.Housing / Config.Society / Config.InventoryDbHouses, Society page (limits, hidden jobs), Inventories page
Config.Snapshots / Config.Punish / Config.ScreenshotsCharacter backups, timed punishments (time buttons, longest time, admin jail), screenshot retention
Config.ThemeDefault accent colour and theme (every staff member can pick another one in Settings)
Config.VersionCheckUpdate check in the server console: on / off, what it prints, how often

Config.Locale

Lua
-- Language file from the locales folder (locales/en.lua -> 'en').
Config.Locale = 'en'

Config.Bridge

Lua
-- Which resources the script talks to. 'auto' detects them from your server (the first one
-- of the list below that is running). 'custom' = fill in the CUSTOM part of the bridge file.
Config.Bridge = {
    -- 'auto' | 'qbcore' | 'qbox' | 'esx' | 'custom'
    Framework = 'auto',

    -- 'auto' | 'ox_inventory' | 'qs-inventory' | 'qb-inventory' | 'framework' | 'custom'
    Inventory = 'auto',

    -- 'auto' | 'ox_lib' | 'qbcore' | 'qbox' | 'esx' | 'okokNotify' | 'native' | 'custom'
    Notify = 'auto',

    -- Keys for vehicles spawned from the panel (bridge/admin/client.lua):
    -- 'auto' | 'qbx_vehiclekeys' | 'qb-vehiclekeys' | 'wasabi_carlock' | 'MrNewbVehicleKeys' | 'qs-vehiclekeys'
    -- | 'Renewed' (Renewed-Vehiclekeys) | 'jaksam-vehicles-keys' | 'jc_vehiclekeys' | 'mk_vehiclekeys' | 'cd_garage'
    -- | 'okokGarage' | 't1ger_keys' | 'tgiann-hotwire' | '0r-vehiclekeys' | 'ak47_qb_vehiclekeys' | 'ak47_vehiclekeys'
    -- | 'brutal_keys' | 'filo_vehiclekey' | 'ic3d_vehiclekeys' | 'is_vehiclekeys' | 'LifeSaver_KeySystem'
    -- | 'mm_carkeys' | 'p_carkeys' | 'rd_vehiclekeys' | 'sna-vehiclekeys' | 'none' | 'custom'
    VehicleKeys = 'auto',

    -- Fuel of vehicles spawned / fixed from the panel (bridge/admin/client.lua):
    -- 'auto' | 'ox_fuel' | 'LegacyFuel' | 'cdn-fuel' | 'ps-fuel' | 'lj-fuel' | 'rcore_fuel' | 'Renewed-Fuel'
    -- | 'okokGasStation' | 'hyon_gas_station' | 'nd_fuel' | 'myFuel' | 'ti_fuel' | 'lc_fuel' | 'lyre_fuel'
    -- | 'qs-fuelstations' | 'x-fuel' | 'none' | 'custom'
    Fuel = 'auto',

    -- Ambulance script used by revive (bridge/admin/server.lua):
    -- 'auto' | 'p_ambulancejob' | 'qbx_medical' | 'wasabi_ambulance' | 'qb-ambulancejob' | 'esx_ambulancejob'
    -- | 'compat' (sends hospital:client:Revive + esx_ambulancejob:revive - used for brutal_ambulancejob,
    --   ars_ambulancejob, osp_ambulance, tk_ambulancejob, ak47 and most other ambulance scripts)
    -- | 'native' | 'custom'
    -- If a player is still dead 2.5 seconds after a revive, lg_admin revives them itself.
    Revive = 'auto',

    -- Houses in the player profile and the Discord bot (bridge/admin/housing.lua):
    -- 'auto' | 'tk_housing' | 'qs-housing' | 'rtx_housing' | 'ps-housing' | 'qbx_properties' | 'qb-houses'
    -- | 'esx_property' | 'none' | 'custom'
    Housing = 'auto',

    -- Job money on the Society page (bridge/admin/society.lua):
    -- 'auto' | 'builtin' (lg_admin keeps the money - see Config.Society) | 'lg_banking' | 'Renewed-Banking'
    -- | 'okokBanking' | 'RxBanking' | 'tgg-banking' | 'fd_banking' | 'wasabi_banking' | 'prism_banking'
    -- | 'qs-banking' | 'snipe-banking' | 'p_banking' | 'crm-banking' | 'kartik-banking' | 'qb-banking'
    -- | 'qb-management' | 'esx_addonaccount' | 'vms_bossmenu' | 'nass_bossmenu' | 'neon-boss'
    -- | 'xnr-bossmenu' | 'custom'
    -- 'auto' uses 'builtin' when none of them is running.
    Society = 'auto',
}

Config.Keys

Lua
-- Keys (players can change them in GTA Settings > Key Bindings > FiveM).
Config.Keys = {
    Panel = 'F10', -- the full admin panel
    Quick = 'F9',  -- the quick menu on the side of the screen (you can keep walking and driving)
}

Config.Theme

Lua
-- The look of the panel. Every staff member can pick another theme or make their own in Settings.
-- Preset = the theme everyone starts with: 'default', 'midnight', 'graphite', 'ocean', 'forest',
-- 'crimson', 'violet', 'sunset', 'light', 'paper', 'mint', 'rose'.
Config.Theme = {
    Accent = '#3b82f6',
    Preset = 'default',
}

Config.AceRoles

Lua
-- Also give staff roles through ACE: `add_ace group.admin lg_admin.role.admin allow`
Config.AceRoles = true

Config.Discord

Lua
-- Needs DiscordBotToken and DiscordGuildId in server_config.lua. The bot needs
-- the "Server Members Intent" (Discord Developer Portal > Bot).
Config.Discord = {
    Enabled = true,
    -- A player's Discord profile (name, avatar, banner, roles, dates) is read once when
    -- they join and kept in memory. Only their roles are checked again, every time they
    -- use a staff command or open the panel.
    RoleRecheckSeconds = 5,     -- don't ask Discord again if the last check is younger than this
    ProfileRefreshMinutes = 60, -- read the full profile again after this many minutes
    GuildRolesMinutes = 10,     -- how often the list of your Discord roles (names, colours) is refreshed
}

Config.Bans

Lua
Config.Bans = {
    -- Quick buttons in the ban window, in hours (0 = permanent).
    Presets = { 1, 6, 24, 72, 168, 720, 0 },
    -- Hardware tokens: FiveM's fingerprints of the player's PC parts. A banned player who changes
    -- accounts (new license / Discord / Steam) on the same PC is still blocked.
    BanTokens = true,
    -- Also ban the IP address. Note: people on the same internet connection (family, internet cafe)
    -- share an IP and are blocked too.
    BanIp = true,
    -- When a banned player gets caught by any identifier or hardware token, every new identifier and
    -- token they connected with is added to the ban, so changing a few of them (spoofing) stops working.
    -- (Not done when only the IP matched.)
    SpreadOnEvasion = true,
    -- Players with this many warnings get a notice in their profile.
    WarningsNotice = 3,
}

Config.Reports

Lua
Config.Reports = {
    Cooldown = 60,          -- seconds between two reports from the same player
    MaxOpenPerPlayer = 1,   -- open reports a player may have at the same time
    Categories = { 'Player', 'Bug', 'Question', 'Other' },
    NotifyStaff = true,     -- show new reports to online staff
}

Config.Announcements

Lua
Config.Announcements = {
    DefaultSeconds = 8,
    MaxSeconds = 30,
}

Config.Logs

Lua
Config.Logs = {
    KeepDays = 30,       -- older logs are deleted automatically
    Joins = true,        -- log joins and leaves
    Deaths = true,       -- log deaths and who killed whom
}

Config.Stats

Lua
Config.Stats = {
    SampleMinutes = 10,  -- how often the player count is saved for the charts
    EconomyMinutes = 30, -- how often the total money of all characters is saved for the money chart
    KeepDays = 90,       -- how long the player count and money history is kept
}

Config.Noclip

Lua
Config.Noclip = {
    -- The txAdmin noclip (a free camera): the mouse looks around, W / A / S / D move where the camera
    -- looks, E / Q go up / down, Shift is faster and Left Alt is slower (on a controller RT / LT).
    -- The character is invisible and is moved to the camera when noclip ends.
    Speed = 0.85,               -- base speed
    FastMultiplier = 6,         -- while holding Shift
    SlowMultiplier = 6,         -- the speed is divided by this while holding Left Alt
    LookSensitivity = 5,        -- mouse
    GamepadLookSensitivity = 2, -- controller
    Fov = 50.0,                 -- camera field of view
}

Config.Names

Lua
Config.Names = {
    Distance = 150.0, -- how far the simple name tags reach (tools.names)
}

Config.Esp

Lua
-- ESP (tools.esp). Every staff member sets lines / boxes / skeletons / bars and the
-- distance for themselves in the panel (F10 > Settings > ESP).
Config.Esp = {
    Distances = { 100, 250, 500, 1000, 2500, 5000, 0 }, -- choices in the quick menu, 0 = unlimited
    FarUpdateMs = 1000,  -- players outside your game's streaming range are drawn from the server, this often
    Color = { 59, 130, 246 }, -- lines and boxes (R, G, B)
}

Config.Inventory

Lua
Config.Inventory = {
    RefreshMs = 700, -- how often an open inventory window checks for changes the player made
}

Config.LiveMap

Lua
Config.LiveMap = {
    UpdateMs = 1000, -- how often player positions are sent to staff who have the map open
}

Config.Monitor

Lua
-- Monitor = watch a player's screen live (WebRTC, straight from the player's game to yours).
-- The video does not go through your server; only the small connection messages do.
Config.Monitor = {
    Enabled = true,
    Fps = 30,
    -- STUN servers help two players find each other. If some players can never be watched
    -- (strict networks), add a TURN server here: { urls = 'turn:host:3478', username = '', credential = '' }
    IceServers = {
        { urls = 'stun:stun.l.google.com:19302' },
        { urls = 'stun:stun1.l.google.com:19302' },
    },
}

Config.Area

Lua
-- Area tools (delete vehicles / revive / heal / kill everyone around you). You see a circle around
-- you that only you can see, move with it, and press Enter to apply (Backspace cancels).
Config.Area = {
    DefaultRadius = 30, -- meters
    MaxRadius = 300,    -- the biggest circle staff can use
    Step = 5,           -- arrow up / down (or the mouse wheel) changes the radius by this much
    SkipOccupied = true, -- "delete vehicles" leaves vehicles that have a player inside
}

Config.Web

Lua
-- The website runs inside this resource (no other program to install). When lg_admin stops, the
-- website stops too. Staff log in with Discord and get exactly the permissions they have in the
-- game, plus they need the 'web.panel' permission (Staff & roles > Roles > Website & Discord bot).
-- Everything that happens on the website shows up in the game right away, and the other way around.
-- Things that need you to be in the game (go to, bring to you, spectate, noclip ...) are greyed out.
--
-- Start (no domain needed):
--   1. Enabled = true and restart lg_admin. The console prints the address, e.g. http://1.2.3.4:40125
--   2. Open Port (40125) in your firewall / hosting panel (TCP).
--   3. server_config.lua: fill ServerConfig.DiscordClientId and ServerConfig.DiscordClientSecret.
--   4. discord.com/developers > your bot's application > OAuth2 > Redirects > Add:
--        http://YOUR-SERVER-IP:40125/auth/callback          (no domain)
--        https://admin.myserver.com/auth/callback            (with a domain)
--
-- Your own domain (https, recommended):
--   Write it in Domain, e.g. 'admin.myserver.com'. lg_admin downloads Caddy by itself (once, from
--   Caddy's official GitHub), gets a free HTTPS certificate and serves the panel on ports 80 + 443.
--   The only thing left for you is the DNS record:
--     Cloudflare > your domain > DNS > Records > Add record
--       Type: A   Name: admin (the first part of the domain)   IPv4 address: your server's public IP
--       Proxy status: DNS only (grey cloud)   > Save
--   Open ports 80 and 443 (TCP) in the firewall. After a minute https://admin.myserver.com works.
--
-- Already have a website on ports 80 / 443 on this machine? It keeps running:
--   - It is Caddy: nothing to do, lg_admin adds the admin site to it by itself.
--   - Anything else (nginx, IIS, Apache ...): two programs can't share port 443, so lg_admin runs the
--     admin site on FallbackPort next to it and Cloudflare sends the domain there. The address stays
--     https://admin.myserver.com. Do this once in Cloudflare:
--       1. The DNS record above, but Proxy status: Proxied (orange cloud).
--       2. Rules > Origin Rules > Create rule > "Hostname" equals admin.myserver.com
--          > Destination Port: Rewrite to 8443 (your FallbackPort) > Deploy.
--       3. SSL/TLS > Overview > Configure: Full (not "Full (strict)").
--       4. Open FallbackPort (TCP) in the firewall.
Config.Web = {
    Enabled = false,
    Port = 40125,           -- the panel itself (http://YOUR-SERVER-IP:40125 when Domain is empty)
    Domain = '',            -- e.g. 'admin.myserver.com' for https on 80 / 443 (see above); empty = IP + Port
    FallbackPort = 8443,    -- only used when ports 80 / 443 are taken by another website (see above)
    Caddy = true,           -- false = you run your own reverse proxy from your Domain to 127.0.0.1:Port
    LoginColor = '#3b82f6', -- colour of the login button
    SessionDays = 7,        -- staff stay logged in for this many days
}

Config.Bot

Lua
-- The bot from server_config.lua gets slash commands in your Discord (ServerConfig.DiscordGuildId).
-- A staff member can use a command when their role has 'discord.commands' AND the permission of that
-- action - the same roles as in the game. Example: /giveitem needs 'players.giveitem' (online) or
-- 'inventory.add' + 'inventory.offline' (offline character). Everything is written to the logs
-- with "via Discord".
-- Commands that take a player ask for a Discord user, then show their characters in a menu
-- (citizen id, online on that character or not, and which one they played last).
-- If the commands don't show up, invite the bot again with this link (put your Client ID in it):
--   https://discord.com/oauth2/authorize?client_id=YOUR_CLIENT_ID&scope=bot%20applications.commands&permissions=0
Config.Bot = {
    Enabled = false,
    Private = true,        -- true = only the staff member who used a command sees the answer
    Color = '#3b82f6',     -- line colour of the bot's messages
    Status = true,         -- the bot shows "Watching 12 / 48 players"
    HideCommands = false,  -- true = only Discord admins see the commands until you allow roles in Server Settings > Integrations
    ExtraGuilds = {},      -- more Discord server IDs to add the commands to (roles are always read from DiscordGuildId)
    -- Rename a command, or set it to false to remove it. Lowercase letters, numbers, - and _ only.
    Commands = {
        player = 'player',           -- profile card: online state, playtime, warnings, bans, characters, quick actions
        inventory = 'inventory',     -- picture of the inventory + give / remove items, clear
        giveitem = 'giveitem',
        vehicles = 'vehicles',       -- every vehicle: garage, plate, max performance, transfer, delete, add
        houses = 'houses',           -- houses of a character: owner, keys, door codes, storages (open and edit)
        givevehicle = 'givevehicle',
        character = 'character',     -- details, money, job, gang, edit, delete
        money = 'money',
        setjob = 'setjob',
        setgang = 'setgang',
        revive = 'revive',
        heal = 'heal',
        armor = 'armor',
        feed = 'feed',
        kill = 'kill',
        freeze = 'freeze',
        disarm = 'disarm',
        kick = 'kick',
        dm = 'dm',                   -- message on the player's screen
        spawncar = 'spawncar',       -- spawn a vehicle next to the player
        troll = 'troll',
        warn = 'warn',
        ban = 'ban',
        unban = 'unban',
        players = 'players',
        staff = 'staff',
        version = 'version',         -- your version, what changed since then and the files to update
        announce = 'announce',
        reports = 'reports',
    },
}

Config.Housing

Lua
-- The player profile (Houses tab) and the Discord bot (/houses) show every house of a character:
-- address, location, owner, who has keys and their rights, door codes and every storage inside,
-- which staff can open and edit like a trunk. The housing script is picked in Config.Bridge.Housing.
Config.Housing = {
    Enabled = true,
    Apartments = true, -- also show qb-apartments when it runs next to a housing script
}

Config.Society

Lua
-- The Society page: every job that has money, add / remove / set, graphs and a money log for each
-- job. The script that holds the job money is picked in Config.Bridge.Society.
--
-- Built-in system (Config.Bridge.Society = 'builtin'): lg_admin keeps the money of every job in the
-- table lgadmin_society. A job that was never used has $0. Other scripts use:
--   exports.lg_admin:GetSocietyMoney(job)                   -> balance
--   exports.lg_admin:AddSocietyMoney(job, amount, reason)   -> true, new balance  /  false, reason
--   exports.lg_admin:RemoveSocietyMoney(job, amount, reason)
--   exports.lg_admin:SetSocietyMoney(job, amount, reason)
-- These exports also work with every other society script: they go to the one in Config.Bridge.Society.
-- Every change (with the script that made it) is in the money log of the job.
Config.Society = {
    Enabled = true,
    Min = false,       -- lowest balance a job can have, e.g. -10000 (false = no limit)
    Max = false,       -- highest balance a job can have, e.g. 1000000 (false = no limit)
                       -- the limits apply to every change with 'builtin', and to staff changes otherwise
    SampleMinutes = 5, -- how often the balance of every job is saved for the graphs
    KeepDays = 90,     -- money logs and graph points older than this are deleted
    Hidden = { 'unemployed' }, -- jobs that are never shown
}

Config.InventoryDb

Lua
Config.InventoryDb = {
    Enabled = true,
    CacheMinutes = 5, -- the list of every inventory is read again after this (or with the refresh button)
}

Config.Snapshots

Lua
-- A copy of every character's inventory, money, job and gang is saved while they play, so staff
-- can see what changed and restore it after a bug or a grief (player profile > Backups). Before a
-- restore a new backup is taken, so a restore can be undone too.
Config.Snapshots = {
    Enabled = true,
    IntervalHours = 12, -- a new automatic backup of a playing character after this many hours
    KeepDays = 14,      -- automatic backups older than this are deleted (backups made by staff are kept)
}

Alerts and ban templates

Config.Alerts and Config.Punishments are gone. Alert rules are made in the panel (Watchlist & Alerts > Alert rules, permission alerts.manage) and ban templates in Bans > Templates (permission bans.templates). Old blocks are copied into the panel once.

Config.Punish

Lua
-- ---------------------------------------------------------------------------
-- Punishments (Punish in the player profile)
-- ---------------------------------------------------------------------------
-- Timed punishments: no weapons, a list of blocked weapons, no shooting, no melee, no damage to
-- players, no driving / no vehicles, a speed limit, no sprinting, no jumping, first person only,
-- voice mute, chat mute, no reports and admin jail. Every one has its own permission
-- ('punish.<name>', Staff & roles > Roles > Edit > Punishments). The time only counts while the
-- player is online, so logging out does not end it. Add your own in punishments.lua.
-- Ban templates (with steps: 1st time 1 day, 2nd time 7 days ...) are made in the panel: Bans > Templates.
Config.Punish = {
    Minutes = { 5, 10, 15, 30, 60, 120, 240 }, -- quick buttons in the Punish window
    MaxMinutes = 10080,                        -- the longest punishment staff can give (10080 = 7 days)
    ReasonRequired = true,                     -- staff must write a reason
    Jail = {
        -- Where "Admin jail" puts the player (Bolingbroke prison yard). The player can't leave
        -- the circle (Radius in metres) until the time is up.
        Coords = { x = 1691.6, y = 2565.2, z = 45.56, w = 180.0 },
        Radius = 35.0,
        -- Where the player goes when it ends. false = back where they were when it started,
        -- or a position like { x = 1848.5, y = 2585.9, z = 45.67, w = 270.0 } (outside the prison gate).
        Release = false,
    },
}

Config.VersionCheck

Lua
-- ---------------------------------------------------------------------------
-- Version check
-- ---------------------------------------------------------------------------
-- When the server starts (and every RepeatHours), lg_admin asks legendscripts.xyz which version is the
-- newest and prints it in the server console if yours is older. Only the version number is sent.
Config.VersionCheck = {
    Enabled = true,    -- false = never check
    Changes = true,    -- print what changed in every version you are missing
    Files = true,      -- print the files to replace (each file once, even if it changed in several versions; new files are marked)
    UpToDate = false,  -- also print a line when you already have the newest version
    Panel = true,      -- owners see a small "update available" box on the dashboard
    RepeatHours = 6,   -- check again every X hours (0 = only when the server starts)
}

Config.Screenshots

Lua
-- The camera button in the monitor saves what the player's screen shows right now. Screenshots are
-- kept in the database (open them from the log), and sent to the 'screenshots' webhook when set.
Config.Screenshots = {
    KeepDays = 30,
}

Config.NewVehicleGarage

Lua
-- Garage for vehicles added from the panel (Vehicles > Add vehicle) when staff leave the garage empty.
-- 'auto' = jg-advancedgarages: 'Legion Square', qb-garages / Qbox: 'pillboxgarage'.
-- Or write the garage name yourself (it must be a garage that exists in your garage script).
Config.NewVehicleGarage = 'auto'

Config.PedModels / Config.Vehicles / Config.Weathers

Lists offered in the panel (ped models for "Set model", extra vehicles when your framework has none, weather types).

Last updated