Admin Panel

Installation

Install the resource, make yourself owner and link your Discord roles.

View in store
  1. Put lg_admin in your resources folder.
  2. Start it in server.cfg after its requirements and your framework:
server.cfg
ensure ox_lib
ensure oxmysql
# your framework (qb-core / qbx_core / es_extended), inventory, garages ...
ensure lg_admin
  1. Open server_config.lua and write your own identifier in ServerConfig.Owners ('discord:...', 'license:...' or 'fivem:...'). Owners always have every permission.
  2. Start the server. The database tables (lgadmin_*) are created automatically.
  3. Press F10 in game. Open Staff & roles to set up your roles.
server_config.lua
ServerConfig.Owners = {
    'discord:123456789012345678',
}

Discord bot (roles and profiles)

  1. Go to discord.com/developers (opens in a new tab) > New Application > Bot > Reset Token and copy the token into ServerConfig.DiscordBotToken.
  2. On the same Bot page turn on Server Members Intent.
  3. Invite the bot to your Discord: OAuth2 > URL Generator > tick bot and applications.commands > open the link. It needs no permissions.
  4. Copy your Discord server ID (right-click the server > Copy Server ID, with Developer Mode on) into ServerConfig.DiscordGuildId.
  5. Restart and link Discord roles to your staff roles in Staff & roles > Roles > Edit.
server_config.lua
ServerConfig.DiscordBotToken = 'your bot token'
ServerConfig.DiscordGuildId = '123456789012345678'

Webhooks (optional)

Every log is kept in the panel. To also post them in Discord, paste webhook URLs into ServerConfig.Webhooks (admin, bans, reports, joins, deaths, staff, alerts, screenshots, society, scripts). Leave any of them empty.

Chat commands that already exist

If another resource already uses one of the chat commands (/car, /dv, /tpm, /revive ...), rename ours or set it to false in Config.Commands - see Commands.

Updating

  • The server console tells you when a new version is out: what changed and which files to replace (each file once, new files marked). Owners also see it on the dashboard, and everyone sees the version at the bottom of the side menu - click it (panel.versions) for what changed since your version and which files to replace. Set it up in Config.VersionCheck.
  • Replace every file except server_config.lua (and your edited config.lua, actions.lua, locales and bridge files).
  • New permissions from an update are not added to roles that already exist. The role editor marks them as new - tick the ones each role should get.
  • Old Config.Alerts and Config.Punishments blocks are copied into the panel the first time 1.1.0 starts (alert rules and ban templates). After that you can delete them.

Last updated