MrPoulpi UI configuration reference
Every setting of MrPoulpi UI shared/config.lua: framework, menu, permissions, colours, positions, minimap, notifications and limits.
Everything is set in shared/config.lua. This file is read by both the client and the server: never put a webhook or player identifiers in it. After a change, run ensure mrpoulpi_ui (or restart the server).
General
| Setting | Type | Default | Effect |
|---|---|---|---|
Config.Framework | string | 'auto' | Framework in use: auto, esx, qbcore, qbox, standalone or custom. With auto, the resource looks for qbx_core, then es_extended, then qb-core, and falls back to standalone if none is started. If the chosen framework does not answer, the server console prints “Framework … unavailable, falling back to standalone”. |
Config.Locale | string | 'fr' | Language of the shipped texts: fr or en. A key missing from the chosen language is taken from English, then shown as is. |
Config.Debug | boolean | false | Prints openings, closings, actions and callback errors in the F8 and server consoles. Keep false in production. |
Config.Animations | boolean | true | Enables the enter and leave animations of every element. false turns them all off. |
Menu access
| Setting | Type | Default | Effect |
|---|---|---|---|
Config.Command.enabled | boolean | true | Creates the command that opens the demo menu. |
Config.Command.name | string | 'uimenu' | Command name, without the slash. |
Config.Keybind.enabled | boolean | true | Binds a key to open the menu. |
Config.Keybind.key | string | 'F7' | Default key. Each player can change it in Settings → Key Bindings → FiveM. GTA keeps the key chosen by the player: changing this value does not change the key of players who already joined. |
Config.Keybind.mapper | string | 'keyboard' | Input device of the key, as expected by RegisterKeyMapping (keyboard, mouse_button…). |
Config.Permissions.enabled | boolean | true | Restricts the menu to the players allowed below. false opens it to everyone. |
Config.Permissions.groups | string[] | { 'admin', 'superadmin', 'god' } | Allowed groups. ESX: player group; QBCore: QBCore permission; in every case, the group.<name> ACE counts too. |
Config.Permissions.jobs | string[] | {} | Allowed jobs, whatever the grade. Empty = none. |
Config.Permissions.aces | string[] | { 'mrpoulpi_ui.menu' } | Allowed ACE permissions, granted in server.cfg with add_ace. |
A player is allowed as soon as one condition is met: an ACE from the list, a group or a job. On Qbox and in standalone, groups are read through ACE only (group.admin, group.god…).
Config.Permissions = {
enabled = true,
groups = { 'admin', 'superadmin' },
jobs = { 'police' },
aces = { 'mrpoulpi_ui.menu' }
}
For a different rule (minimum grade, list of identifiers), edit Hooks.HasPermission in server/hooks.lua.
Colours
| Setting | Type | Default | Effect |
|---|---|---|---|
Config.Theme | table | see below | Hex colours of the types and buttons: success, info, warning, danger, media, key, and their -hover variant for mouse hover. |
Config.Theme = {
['success'] = '#2BB24C',
['success-hover'] = '#3ACB5C',
['info'] = '#4250E6',
['info-hover'] = '#5865F5',
['warning'] = '#E8962E',
['warning-hover'] = '#F4AB4E',
['danger'] = '#C62A2F',
['danger-hover'] = '#DD3D42',
['media'] = '#D3242A',
['key'] = '#E6E7EA'
}
| Colour | Used for |
|---|---|
success, info, warning |
Notifications and buttons of that type. |
danger |
error notifications and danger buttons (including Cancel and Close). |
media |
Banner of media notifications. |
key |
Keys of the hint and the keybind bar. |
…-hover |
Hovered button. |
Layout
| Setting | Type | Default | Effect |
|---|---|---|---|
Config.Layout.scale | number | 1.0 | Size multiplier for the whole interface, on top of the automatic resolution scaling (1920 × 1080 reference). Bounded from 0.5 to 2. |
Config.Layout.notifications | string | 'minimap' | Notification position: minimap, top-left, top-right, bottom-left, bottom-right or bottom-center. |
Config.Layout.hint | string | 'top-left' | Position of the interaction hint (“Press [E] …”). Same values. |
Config.Layout.keybinds | string | 'bottom-right' | Position of the keybind bar. Same values. |
Available positions: minimap (notifications only), top-left, top-right, bottom-left, bottom-right, bottom-center.
The interface scales itself to the resolution, from a 1920 × 1080 base: up to 1.6 times larger in 4K and down to 0.7 times on a small screen. Layout.scale applies on top.
Minimap
These settings apply when Config.Layout.notifications = 'minimap'.
| Setting | Type | Default | Effect |
|---|---|---|---|
Config.Minimap.gap | numberpixels at 1080p | 12 | Space between the top of the minimap and the closest notification. |
Config.Minimap.matchWidth | boolean | true | Gives notifications the width of the minimap. false keeps their normal width, aligned on the left edge of the minimap. |
Config.Minimap.refresh | numbermilliseconds | 500 | How often the minimap position is recomputed (safe zone, aspect ratio, big map, hidden minimap). Nothing is sent to the interface if nothing changed. |
Config.Minimap.bigmapWidth | number | 1.58 | Width multiplier when the big map is open (Z key). |
Config.Minimap.bigmapHeight | number | 2.18 | Height multiplier when the big map is open. |
The newest notification appears closest to the minimap. If the stack reaches the top of the screen, the oldest ones are removed. When the minimap is hidden, notifications move to the bottom of the screen.
If your server uses a modified minimap (different shape or position), adjust gap or pick another position.
Notifications
| Setting | Type | Default | Effect |
|---|---|---|---|
Config.Notify.defaultType | string | 'success' | Type used when no valid type is given: success, info, warning or error. |
Config.Notify.duration | numbermilliseconds | 5000 | Default display time. |
Config.Notify.minDuration | numbermilliseconds | 1000 | Minimum time: a shorter duration is raised to this value. |
Config.Notify.maxDuration | numbermilliseconds | 30000 | Maximum time: a longer duration is lowered to this value. |
Config.Notify.max | number | 5 | Number of notifications shown at once. Beyond that, the oldest are removed. |
Limits and security
| Setting | Type | Default | Effect |
|---|---|---|---|
Config.Input.maxLength | numbercharacters | 120 | Maximum length of an input. A window maxLength is lowered to this value, and the server refuses any longer value. |
Config.Security.menuCooldown | numbermilliseconds | 750 | Minimum delay between two requests to open the menu or the company menu by the same player. Requests too close together are ignored. |
Config.Security.actionCooldown | numbermilliseconds | 250 | Minimum delay between two server actions by the same player. |
Company announcements
| Setting | Type | Default | Effect |
|---|---|---|---|
Config.Companies.enabled | boolean | true | Enables company announcements (command, menu buttons and server actions). |
Config.Companies.command | string | 'entreprise' | Command that opens the player’s company menu. Empty = no command. |
Config.Companies.cooldown | numberseconds | 60 | Delay between two announcements of the same company, all employees together. |
Config.Companies.duration | numbermilliseconds | 10000 | Display time of the announcements, bounded by Notify.minDuration and Notify.maxDuration. |
Config.Companies.minLength | numbercharacters | 3 | Minimum length of a custom announcement, after spaces are cleaned. |
Config.Companies.maxLength | numbercharacters | 120 | Maximum length of a custom announcement. Cannot exceed Input.maxLength. |
Config.Companies.staff | string | nil | 'administration' | Company of the list on whose behalf players with the menu permission can announce when they have no configured job. nil turns this off. |
Config.Companies.list | table | 5 example companies | Allowed companies, keyed by job name: label, type, minGrade, logo, logoText, openMessage, closeMessage. |
The company list is detailed in Company announcements.
Menu
| Setting | Type | Default | Effect |
|---|---|---|---|
Config.Menu | table | demo menu | Window opened by the command and the key, in the OpenUI format. Options with server = true run on the server. |
Config.Menu = {
type = 'choice',
title = 'menu_title',
cancel = true,
columns = 3,
options = {
{ id = 'success', group = 'menu_group_notifications', label = 'menu_success', variant = 'success', action = 'demo_success', keepOpen = true },
{ id = 'server', group = 'menu_group_hud', label = 'menu_server', action = 'demo_server', server = true, keepOpen = true }
}
}
Texts can be keys from shared/locales.lua or plain text. An option can carry an ace field: it is only shown to players with that permission. Every field is described in Windows.
Texts
Texts live in shared/locales.lua, one table per language. To add a language, copy the en block, rename it (for example de), translate it and set Config.Locale = 'de'. A missing key is taken from the en block.