Eight steps from the download to a running panel.
Install with AI
Rather not go through the steps one by one? Copy this prompt into an AI assistant that can open your server's files. It asks you what it needs and does the installation with you.
You are installing **5code-adminpanel** into an existing, live FiveM server that may contain irreplaceable work. 5code-adminpanel is an in-game admin panel for QBCore, Qbox and ESX, and its resource folder is open in front of you. Configure this one resource correctly **without causing any damage to anything else.** Follow these rules exactly.
HARD RULES (do not break these)
1. **Do not delete anything**: files, folders, database tables, columns or rows, config entries, or server.cfg lines. Installing only adds.
2. **Stay inside the 5code-adminpanel folder.** Do not modify, move, rename or delete any other resource. The only outside file you may touch is server.cfg, and only to **add** the lines in step 5 of the procedure, after showing them to the owner and getting an OK.
3. **Never run destructive database commands** (DROP, TRUNCATE, DELETE, ALTER ... DROP, an UPDATE without WHERE). The script creates its own tables on first start. You do not run SQL by hand.
4. **Do not rename the resource folder.** It stays 5code-adminpanel: the update check looks for that name.
5. **Do not stop, edit or remove the owner's old admin menu yourself.** The panel uses the commands /admin, /adminmenu, /report and /ticket. The admin menus that come with the frameworks use some of the same names: qb-adminmenu (QBCore) and qbx_adminmenu (Qbox) use /admin and /report, esx_adminmenu (ESX) uses /adminmenu. Tell the owner which resource shares a name and let the owner decide: stop it, or rename the panel's commands in config.lua.
6. **Ask, don't guess.** Ask the owner for every server-specific value: notification system, inventory, who is a super-admin, command names.
7. **Never ask for, read out or write down secrets.** The FairShield API key and the Discord webhook URLs go into config_server.lua. Tell the owner where the line is and let the owner paste the value. Never put them into config.lua, a chat message, a log or any other file.
8. **Do not restart the whole server yourself.** The super-admin lines in server.cfg need one full restart: tell the owner, and let the owner choose the moment.
9. **Back up before editing** config.lua and server.cfg (keep a .bak copy).
10. **If anything is unclear or risky, stop and ask** instead of going on.
QUESTIONS TO ASK THE OWNER FIRST
1. Which notification system does the server use: qb, ox_lib, codem-notification or esx? (The default is qb. On ESX use esx or ox_lib.)
2. Which inventory: qb-inventory, ox_inventory or codem-inventory?
3. Framework: is 'auto' fine? It finds QBCore, Qbox and ESX by itself.
4. Who is super-admin? Their license identifier(s), or "everybody already in group.admin". Everybody in group.admin gets full access to the panel, so this is for owners only. Staff get a rank inside the panel later.
5. Does another admin menu run on the server (qb-adminmenu, qbx_adminmenu, esx_adminmenu or another)? Stop it, or rename the panel's commands?
6. FairShield lookup and Discord webhooks: wanted? The FairShield API key is free, through the 5CODE partnership with FairShield. The owner asks for it in the FairShieldAC Discord: https://discord.gg/fairshieldac. The owner pastes the key and the webhook URLs in themselves.
INSTALLATION PROCEDURE
1. Check that the folder is named 5code-adminpanel and sits in a resources folder the server loads, for example resources/[5code]/5code-adminpanel.
2. Check that oxmysql and the framework (qb-core, qbx_core or es_extended) are there and that OneSync is on. If something is missing, report it and pause.
3. Edit **config.lua only**, with the owner's answers: Config.NotifySystem, Config.InventorySystem, Config.Framework (leave 'auto'), and the command names if the owner chose to rename them: Config.DashboardCommand (/admin), Config.MiniMenuCommand (/adminmenu), Config.ReportCommand (/report), Config.TicketCommand (/ticket). Change values in place. Do not remove other settings.
4. Only if wanted: show the owner where FairShield and the webhooks are in config_server.lua. FairShield is ConfigServer.FairShield: set Enabled = true, and the owner pastes the key into ApiKey. Webhooks are ConfigServer.Webhooks: the owner pastes a URL into each line they want. Do not type these values yourself.
5. Show the owner these lines for server.cfg, get an OK, then add them. Do not reorder or remove existing lines.
add_ace group.admin 5code-adminpanel.admin allow
add_principal identifier.license:THEIR_LICENSE group.admin (one line per super-admin; leave it out for anybody already in group.admin)
ensure 5code-adminpanel (after ensure oxmysql and the framework; the end of the resource list is the easy place)
6. Leave the database alone: the script creates its tables on first start (MySQL or MariaDB).
7. Tell the owner that one full server restart is needed, because server.cfg is only read when the server starts, and what the console shows afterwards:
[5code-adminpanel] database ready.
[5code-adminpanel] Up to date (1.0.0).
The second line is the update check (the version can differ). It needs the internet; if it is missing, nothing is wrong. If the console says "schema statement(s) failed", the oxmysql error above that line says why. Usually the database user may not create tables.
WHEN FINISHED
Summarize: which config.lua values you set (and the values before), the exact server.cfg lines you added, which other admin menu shares a command name, what the owner still has to do (restart, paste the FairShield key or webhooks), and the in-game test: /admin opens the panel and the top right says "Signed in as Super Admin"; /report test shows the ticket window a player gets. If you could not finish a step safely, say so. Never use a destructive shortcut.
# 1. Download
Download 5code-adminpanel from your Cfx portal (Granted Assets) and unzip it.
# 2. Copy the folder
Copy the folder into your server's resources folder, for example resources/[5code]/5code-adminpanel.
The panel uses these chat commands:
Command What it does Name can be changed in config.lua
/adminOpens the panel Yes: Config.DashboardCommand
/adminmenuOpens the quick menu Yes: Config.MiniMenuCommand
/reportA player writes a ticket Yes: Config.ReportCommand
/ticketA player opens their ticket chat again Yes: Config.TicketCommand
Another admin menu that uses one of these names clashes with the panel. The admin menus that come with
the frameworks do:
Framework Its own admin menu Names it also uses
QBCore qb-adminmenu/admin, /report
Qbox qbx_adminmenu/admin, /report
ESX esx_adminmenu/adminmenu
Stop it: make sure it no longer starts with your server. If you want to keep it, give the panel's
commands other names in config.lua.
Warning:
With two scripts on one name, the command opens only one of them, and which one can change after a
restart. On ESX, /adminmenu opens the ESX menu until you stop esx_adminmenu or rename the panel's
command.
# 4. Add the start line to server.cfg
Start the panel after oxmysql and after your framework.
ensure oxmysql
ensure qb-core # or qbx_core / es_extended
# ... your other resources ...
ensure 5code-adminpanel
The easy way: put the line at the end of your resource list.
# 5. Make yourself super-admin
Add these two lines to server.cfg:
add_ace group.admin 5code-adminpanel.admin allow
add_principal identifier.license:YOUR_LICENSE_HERE group.admin
Line What it does
add_ace …Everybody in the group group.admin is a super-admin of the panel.
add_principal …Puts you into that group. Leave it out if your server.cfg already has this line for you.
A super-admin:
has every permission in the panel,
creates ranks and gives them to staff on the Ranks & Staff page,
stands above every rank: no rank can act on a super-admin.
You can also name super-admins by license in config.lua with Config.Bootstrap. It is empty by default.
Both ways are explained on Super-admin and ranks .
# 6. Check config.lua
The defaults fit a QBCore server. Check these four lines:
Key Default Set it to
Config.Framework'auto'Leave it. 'auto' finds QBCore, Qbox and ESX.
Config.NotifySystem'qb'The notifications your server uses: 'qb', 'ox_lib', 'codem-notification' or 'esx'.
Config.InventorySystem'qb-inventory'Your inventory: 'qb-inventory', 'ox_inventory' or 'codem-inventory'.
Config.Locale'en'Leave it, or see Localization .
Everything else has a working default. All keys: General settings .
Two things are not in config.lua. The FairShield API key and the Discord webhooks are in
config_server.lua, a file that never leaves your server. Both are optional:
FairShield , Webhooks .
# 7. Restart the server
Restart the whole server once. server.cfg is only read when the server starts, so the super-admin lines
are not active before that.
The database tables are created by themselves (Database ). The console shows:
[5code-adminpanel] database ready.
[5code-adminpanel] Up to date (1.0.0).
The second line is the update check. It needs the internet. If it is missing, nothing is wrong.
If you see this instead What it means What to do
[5code-adminpanel] sql/install.sql is missing or empty.The folder is not complete. Copy the whole folder again.
[5code-adminpanel] 2 schema statement(s) failed. The panel may not work. (the number can differ)The database did not accept a part of the table setup. Read the oxmysql error above this line. Check that your database user may create tables.
[5code-adminpanel] database setup stopped: …A later setup step failed. The text after the colon is the database error. Send the full line to support.
No line of the panel at all The resource did not start. Check the folder name, the ensure line and that oxmysql runs.
# 8. Test it
Join the server and type /admin. The First Test takes five minutes.
Extra What you get How
Staff ranks Your staff get exactly the tools you choose Super-admin and ranks
FairShield lookup Check a player's Discord account against FairShield's list of cheat servers FairShield
Discord webhooks Bans, warns, kicks, staff actions, tickets, joins and leaves in Discord Webhooks
Police prison Send players to your server's own prison script Prison scripts
Your own sit room and jail spot Sits and the admin jail where you want them Tickets and sits , Jail
Saved places One press teleports in the quick menu Quick menu and places
Keys for the panel Open the panel and the quick menu with a key General settings
Something does not start? See Troubleshooting or ask on
Discord (opens in a new tab) .