Admin Panel
Installation
Install the resource, make yourself owner and link your Discord roles.
- Put
lg_adminin yourresourcesfolder. - Start it in
server.cfgafter its requirements and your framework:
ensure ox_lib
ensure oxmysql
# your framework (qb-core / qbx_core / es_extended), inventory, garages ...
ensure lg_admin- Open
server_config.luaand write your own identifier inServerConfig.Owners('discord:...','license:...'or'fivem:...'). Owners always have every permission. - Start the server. The database tables (
lgadmin_*) are created automatically. - Press F10 in game. Open Staff & roles to set up your roles.
ServerConfig.Owners = {
'discord:123456789012345678',
}Discord bot (roles and profiles)
- Go to discord.com/developers (opens in a new tab) > New Application > Bot > Reset Token and copy the token into
ServerConfig.DiscordBotToken. - On the same Bot page turn on Server Members Intent.
- Invite the bot to your Discord: OAuth2 > URL Generator > tick
botandapplications.commands> open the link. It needs no permissions. - Copy your Discord server ID (right-click the server > Copy Server ID, with Developer Mode on) into
ServerConfig.DiscordGuildId. - Restart and link Discord roles to your staff roles in Staff & roles > Roles > Edit.
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 inConfig.VersionCheck. - Replace every file except
server_config.lua(and your editedconfig.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.AlertsandConfig.Punishmentsblocks 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