
Give your FiveM resources one shared interface and a consistent set of Lua utilities. Cortex Library provides menus, prompts, notifications and player settings, with reusable tools for the scripts that build on it.
| 2 MENU TYPES | 5 INPUT FIELD TYPES | 5 SKILL CHECK STYLES | SHARED PLAYER SETTINGS |
Actual Library settings NUI with demonstration data.
/// FEATURES
ONE LIBRARY, USEFUL BUILDING BLOCKS
| Notifications Success, information, warning and error notices with configurable position, duration and sound. Players choose how many notices remain visible. | List menus Keyboard and mouse navigation, disabled rows, selectable values and a shared icon set. Home, End, paging keys and the mouse wheel support longer lists. | |
| Radial menus Wheel or Fan style, picked by each player. Nested choices, titles, badges, confirm-twice items and paging, with directional selection, number-key shortcuts and controller support. Set releaseSelect to pick the item under the pointer when a held key is released. | Input dialogs Text, password, number, select and checkbox fields, with required-field validation and cancellation. Password reveal and number limits help make each form usable. | |
| Progress displays Progress bars and circles, optional percentages and cancellation, with completion feedback for the action your script owns. | Five skill-check styles Configure radial, trace, hold, sequence and mash checks. Set the interaction and difficulty for the task instead of building another minigame UI. | |
| Screen and world prompts Show prompts on screen or anchor them to world positions, entities and bones. World prompts and markers are drawn by the game, so they stay pinned when the camera turns. Merged lists and hold indicators handle nearby interactions. | Callouts Put a pin on each part of a vehicle or other entity, with a leader out to a label beside it and a block of switches. Players point and click while still driving, and nothing takes NUI focus. Your resource decides what each label says and what a click does. | |
| Control hints Display keycaps and a shared help legend that reports its height to HUDs. On-screen prompts and notices step around the HUD voice indicator. Consumers own their key bindings, apart from the shared Cortex keys. | Resource settings in one place Register a settings tab with search and live preview. Players can Apply, Save & Resume or Discard & Resume; preferences persist on their client. When many resources register, the tab row scrolls with arrows at each end. | |
| Shared appearance Accent, interface scale, text size, surface opacity, motion and overlap preferences follow the participating resources. Players can keep one presentation across their Cortex interfaces. | Optional quick pause menu An owner-enabled quick menu offers Resume, Map, Settings, native key bindings and Leave server, plus resource-registered pages and waypoint locations. It is disabled by default. | |
| Lua utilities Client/server callbacks, polygon/box/sphere zones, points, raycasts, entity queries, control locks, timers, wait helpers, KVP/JSON utilities and a live player cache. Optional: vehicle replay telemetry, and server group helpers through cortex-phone. | Placement previews A consumer-local model-loading and placement helper provides a cancellable ghost preview with surface probes. The consumer server owns authorization and entity creation. | |
| Thermal, night vision and spotlight beams Reusable sensor modules provide thermal palette control and phosphor night vision, with automatic or manual gain and caller-supplied bright-source protection. Thermal hides graphics-pack light haze so streetlights don't bloom. A volumetric module draws a visible beam for script spotlights; each resource owns its lights and beam settings. | Things Describe an object and what can be done to it, and the library finds the nearest ones, shows one key and one verb, asks the server before anything happens and keeps two players from using the same thing at once. | |
| Look key and recent notices Players tap one key to read up to five notices they missed. Notices can come from a named sender, and a quiet mode keeps all but the important ones off screen. | Cortex keys Four keys that do the same job in every script built on the library: X cancels the newest thing the player started, Y answers an invite or check, M opens one wheel of actions from every script, and B points on a tap or holds. Players bind each key once. | |
/// SETUP / COMPATIBILITY
BEFORE YOU START
| REQUIRES | FiveM. The core library has no framework or database dependency; optional group operations require cortex-phone. |
| INSTALL | Keep the resource folder named cortex-lib and start it before every consumer. The runtime UI, bundled React files and fonts need no frontend build on the server. |
| DEVELOPERS | Declare lua54 'yes', load @cortex-lib/init.lua as a shared script and declare the cortex-lib dependency in each consumer manifest. |
| UPDATES | On start, the server console says when a newer release is on GitHub. One request per start and nothing is downloaded; set cortex_lib_version_check 0 to turn it off. |
| UPGRADING | Replace the complete library folder and restart the server. Coming from 3.x: prompts now show in full only within 1.5 m or when looked at, and six default keys are new (E use, Z look, X cancel, Y answer, M actions, B point). The changelog says how to change each. |
/// WHAT'S INCLUDED
READY FOR YOUR SERVER
| ■ | The Cortex Library ZIP, with readable source, with Lua runtime modules and shared UI files. |
| ■ | The bundled interface runtime, fonts and third-party notices needed to run the UI. |
| ■ | Server configuration and the consumer loader for resource integrations. |
| ■ | Complete source in the ZIP, with the public repository and API documentation linked below. Releases and changelog on GitHub. |

Free to use on servers you own or administer. No resale or redistribution.