CodeM TextUI is a standalone FiveM text UI by CodeM. It shows an interaction prompt with your message and a key letter, in one of ten visual themes, and you show and hide it from any client script with two exports.
Features
- Ten visual themes,
thema-1tothema-10;thema-1is used when no theme is passed - Message text and key letter are set per call
- Exports
OpenTextUIandCloseTextUIshow and hide the prompt - Client events
codem-textui:ShowTextUIandcodem-textui:CloseTextUIdo the same - Plays a notification sound when a prompt appears
- Shows one prompt at a time; a prompt is not shown again while one is open
client/example.luacontains a commented-out sample that places ten prompts with markers
Usage
exports['codem-textui']:OpenTextUI('Open Door', 'E', 'thema-1')
exports['codem-textui']:CloseTextUI()
Requirements
- No framework and no other resources needed (Lua 5.4)
- Players need internet access: the UI loads some of its libraries from public CDNs
Installation
- Copy the folder
codem-textuiinto your resources directory. The archive contains the resource twice (codem-textui/andcodem-textui/codem-textui/), so keep only one copy, withfxmanifest.luadirectly inside it. - Add
ensure codem-textuito your server.cfg. - Call the exports from your own client scripts.