For the complete documentation index, see llms.txt. This page is also available as Markdown.

Configuration

The Admin Menu is configured through four files in the shared/ folder:

File
Purpose

shared/config.lua

Framework, appearance, access, economy, integrations, features

shared/server_config.lua

API keys, exports, Live View, Tworst Cloud uplink

shared/webhooks.lua

Discord webhook logging routes

shared/open_functions.lua

Integration hooks (vehicle keys, spectate, noclip, custom clothing)

Defaults are sensible — in most cases you only need to set your framework, locale, god access, the Discord token, and your webhooks to get started.


shared/config.lua

Framework & General

TW.Framework = "QBCore"   -- "QBCore" or "ESX"
TW.Locale = "en"          -- en, tr, de, fr, es, pt, ru, pl, nl, it, ro, ar, th
TW.AutoSql = true         -- Auto-create/migrate database tables on start
Setting
What it does

TW.Framework

Your server framework. Use "QBCore" for both QBCore and QBox (QBox is QBCore-compatible), or "ESX" for ESX.

TW.Locale

Panel language. 13 languages are built in: en, tr, de, fr, es, pt, ru, pl, nl, it, ro, ar, th (ไทย). Add your own by copying locales/languages.example.json — no UI edit/rebuild needed.

TW.AutoSql

When true, all database tables are created/migrated automatically on start. Set false only if you import sql/install.sql manually.

Appearance

TW.DefaultTheme        = "dark"      -- "dark" | "gray" | "light"
TW.DefaultPrimaryColor = "#4189e5"   -- accent color (hex)

The default theme and accent color applied the first time an admin opens the panel. If an admin later changes them in Settings → Appearance, their personal choice (saved in their browser) overrides these defaults.

Onboarding

A short first-open setup (language + theme) and feature tour, shown once per admin. Set enabled = false to disable it entirely (everyone is treated as already onboarded).

Access & Duty

Setting
What it does

TW.GodRole

The top-tier role granted to god identifiers.

TW.GodIdentifiers

Identifiers that always get full access on join — your owners/devs.

TW.DefaultOnDuty

false = admins must turn duty on manually (recommended); true = on-duty the moment they connect.

TW.OffDutyAccess

What an off-duty admin can do — full (everything, just shows offline), readonly (view only, no actions), or duty (nothing until on-duty).

See Permissions & Roles for the full role system.

Whitelist

Setting
What it does

TW.WhitelistDefaultEnabled

Whether whitelist mode is active on server boot. The in-game toggle is one-shot — a restart reverts to this value.

TW.WhitelistKickReason

Message shown to non-whitelisted players when they're blocked at connect.

Player Display

Setting
What it does

TW.PlayerNameMode

How names show on the Online Players page — character (character name first, FiveM name in parentheses) or fivem (the reverse).

TW.HandcuffAllowWalk

true = handcuffed players can walk slowly (no sprint/attack); false = fully locked in place.

TW.NotifyTargetOnAction

true = the target player gets a pop-up when an admin acts on them (heal, freeze, jail, etc.); false = silent admin actions.

Avatars & Phone

Setting
What it does

TW.AvatarSource

Where player avatars come from. The chosen source is tried first, then falls back (e.g. discord → steam → placeholder). discord/steam need the matching API key/token set in server_config.lua.

TW.AvatarCustom

Only used when AvatarSource = "custom" — an SQL table/column to read an avatar URL from.

TW.PhoneSource

How the player's phone number is resolved — metadata (reads framework metadata, works for ESX/qb-phone), custom (SQL lookup for gksphone/lb-phone/etc.), or none (hidden).

TW.PhoneMetadataKey

The metadata key the phone number is stored under (default phone).


Economy

The economy block tells the panel how your server stores money so that balances display correctly and "set money" actions write to the right place. Configure it to match your framework/inventory.

TW.Currency is just the symbol shown before every amount across the UI (PlayerDetail, RichList, invoices, set-money, etc.).

Cash & Dirty Money

Choosing mode:

Mode
When to use it

account

Most servers. Money is a standard framework account (QBCore PlayerData.money, ESX accounts). This is the default.

item

Your server tracks money as an inventory item (e.g. ox_inventory item-as-cash, Renewed-Cash, marked bills). The panel reads/writes the item count via your inventory.

disabled

Hide this money type from the panel entirely.

accountNames (for mode = "account"): the panel uses the first matching name in the list. Defaults cover QBCore and ESX out of the box (cash/money, crypto/black_money). If your server renamed the account, put your custom name first — e.g. accountNames = { "dirty_money", "black_money" }.

itemName (for mode = "item"): the inventory item name to read/write. Works automatically with whichever inventory system is active.

Quick guide: Standard QBCore/ESX server? Leave everything on account — it just works. Using an item-based cash system? Switch mode = "item" and set itemName. Don't use dirty money at all? Set TW.DirtyMoney.mode = "disabled".


Integration Bridges (Auto-Detected)

Compatibility bridges for your other resources. Leave each on "auto" to detect the running script automatically, or pin an exact key to force a specific provider.

See the supported systems table for every detectable provider.

Garage, Dimensions & Dashboard

The garage IDs must match what your garage script actually uses, or admin "Send to Garage / Impound" actions will assign vehicles to a garage that doesn't exist. The flat values are fallbacks; perSystem overrides them for specific garage scripts. Copy the real IDs from your garage script's own config if you renamed them.

Named routing buckets (dimensions) selectable in the player actions menu — handy for private staff areas or events.

Tickets, Chat, Noclip, Replay, Troll


shared/server_config.lua

API Keys

File Exports

Controls the temporary download links the panel generates for data exports (player data, logs, etc.).

Mugshots & Voice

Live View (WebRTC Screen Watching)

liveViewDefaultPreset sets the starting stream quality (480p → native 60fps). liveViewAudio mixes in nearby in-game voices so you can hear what's happening around the player you're watching.

Get tenantId, serverId, and secret from the pairing snippet in the web panel. Full steps in Web Panel (Tworst Cloud).


shared/webhooks.lua

Route in-game admin logs to Discord. Fill a webhook for every category you want logged — anything blank falls back to default, and if default is also blank those logs go nowhere.

Ticket logging (no bot required): Ticket open & close events — including a transcript link on close — post straight to Discord via these webhooks. Leave everything under tickets for one channel, or split them into two channels with ticketsOpen and ticketsClose.


shared/open_functions.lua

This file holds integration hooks — small functions that run at key moments so you can wire the Admin Menu into your server's other systems. Edit the function bodies; leave the signatures as they are.

AfterVehicleSpawn(vehicle, plate)

Runs on the client right after an admin spawns a vehicle. Use it to hand the vehicle keys to your key system (or any post-spawn logic).

OnSpectateStart(targetServerId) / OnSpectateStop(targetServerId)

Run on the spectating admin's machine when spectate starts/stops — e.g. to hide a HUD or notify scripts while spectating.

OnNoclipStart() / OnNoclipStop()

Run on the admin's machine when noclip is toggled — useful for whitelisting them in your anticheat or bypassing collision/zone scripts.

OpenClothingMenu(ped)

Only used when TW.ClothingSystem = "custom". Called when the Quick Action Clothing button is clicked, so you can open your own appearance script. (In the built-in modes — illenium/fivem/qb/esx — the bridge handles this and the hook is ignored.)

The same spectate/noclip state can be read by other resources via exports/events — see Features → Exports & Events.

Last updated