
BenzyDrawText
A clean, standalone FiveM draw text system. It draws a small on-screen prompt — a keycap and a label, the classic "Press E to ..." hint — anchored anywhere on the screen, and takes it away when you're done. Any resource shows one with a single export, so every script on your server can stop reimplementing the same prompt and speak with one voice. No framework, no database, no dependencies.
Made by Samuel Benzy of Benzy Development.
Features
- One-line prompts —
exports.BenzyDrawText:Show('E', 'Open the door')from any client, orexports.BenzyDrawText:Show(source, ...)from the server to push one to a player. - An abundant API —
Show,Hide, andClearon both client and server (plus server-sideShowAll/Broadcastto reach everyone, and client-sideHideAll,Update,IsShown), with matching events — so any resource can plug in however it likes (docs/EXPORTS.md, docs/EVENTS.md). - Flexible input — pass positional args or an options table, and it accepts the field names other prompt systems use (
label,description, …), so many scripts work unchanged. - Multiple rows — a single prompt can offer several actions at once ("E Refuel" + "H Buy a jerry can"), each its own keycap + label.
- Keyless lines — leave the key off a row and it's a plain text line, for a sign, a label, or a hint.
- Many prompts at once — every prompt has an id, so two resources can each show their own without clobbering each other.
- Nine positions — anchor a prompt to any corner, edge-center, or the middle of the screen.
- Themeable — an optional accent color (per prompt or globally), an overall scale, and full control of the card + keycap colors from the config.
- Passive — the draw-text layer never grabs your mouse or keyboard, so prompts appear whether a menu is open or not.
- Self-tidying — pass a duration to auto-hide a prompt, and if a client-side resource that showed one stops without hiding it, BenzyDrawText clears it for you. (A server resource that pushes prompts should hide/clear them itself on stop.)
- Standalone — no framework (ESX/QBCore) and no database required.
How it works
- The client runs a small draw-text funnel (
DrawTextShow) that normalises a prompt and hands it to a lightweight display layer that draws each prompt and never grabs input, so it works with any menu open or closed. - The server side is just a router:
Show(source, ...)triggers a client event on the target player(s), and the client renders it. - Everything visual — the position, scale, accent, and the card + keycap theme — is read from
config.luaand applied when it loads, so a config change is all it takes to restyle.
Requirements
- A FiveM server. That's it — BenzyDrawText is standalone.
Installation
- Place the
BenzyDrawTextfolder in your server'sresourcesdirectory. - Add it to your
server.cfg, before any resource that draws prompts through it:ensure BenzyDrawText - Open
config.luaand set the position, scale, and theme to taste. - Restart the server (or
ensure/restart BenzyDrawText).
The /testdrawtext preview command is off by default — enable it in config.lua (Config.TestCommand), then run it in-game to check the position and style.
Configuration
Everything is configured in config.lua, and every option has a comment above it explaining what it does. The highlights:
Layout
| Option | What it does |
|---|---|
Config.Position | The default anchor a prompt uses when a caller doesn't pass its own — see Positions. |
Config.Scale | An overall size multiplier for every prompt (default 1.0). A caller may override it per prompt. |
Appearance
| Option | What it does |
|---|---|
Config.Accent | An optional default accent color (any CSS color) — a left bar on the card + a keycap tint. false for the clean neutral look. A caller may override it per prompt. |
Config.Style | The card + keycap theme: background, text color, corner radius, font size, and the keycap colors. |
Commands & locale
| Option | What it does |
|---|---|
Config.TestCommand | The /testdrawtext preview command (off by default; when on it's available to everyone and only shows to the caller). |
Config.Locale | Active language code (default 'en'). |
Positions
Set Config.Position (or pass position per prompt) to one of:
top-left top-center top-right
center-left center center-right
bottom-left bottom-center bottom-right
The classic "Press E" spot is bottom-center, the default.
Commands
/testdrawtext— draw a sample prompt locally for a few seconds so you can preview the position + style. Disabled by default — enable it inConfig.TestCommand; when on it's available to everyone and only ever shows to the player who runs it.
Integrating with other resources
BenzyDrawText is built to be the draw-text layer for your other scripts, so you write the prompt once and reuse it everywhere. The docs cover it:
- docs/EXPORTS.md — every export, client + server, with examples.
- docs/EVENTS.md — the event-based alternatives.
- docs/INTEGRATIONS.md — swapping a resource's built-in prompt over to it, and calling it from any resource.
If a resource already funnels its hints through one function (like a Prompt.Set / Prompt.Clear pair), pointing it at Show / Hide is a one-line change — and you can then delete that resource's own prompt NUI.
Notes
- Prompts are purely visual and client-side. Nothing is saved — a prompt shows, then hides. Deciding when to show it (proximity, a raycast, an
ox_targetoption) is your resource's job; BenzyDrawText just draws it. - The layer is passive. It never captures your cursor or keys; prompts appear over any menu.
- The key label is whatever you pass. BenzyDrawText draws the key string you give it — if your resource lets players rebind a key, pass the current binding so the prompt reflects it.
Troubleshooting
- Turn on debug logging first — set
Config.Debug = true, restart the resource, and watch each client's F8. Every prompt shown/hidden is logged with its id. - Nothing shows — make sure BenzyDrawText is started, and (for prompts from another resource) that it starts before that resource in
server.cfg. Enable and run/testdrawtextto confirm the layer itself is working. - A prompt is in the wrong place — set
Config.Position, or passpositionper prompt, and restart. Use/testdrawtextto preview an anchor. - A prompt got stuck on screen — call
Hide(id)for it, orHideAll(). A prompt stays until you hide it (or itsdurationelapses); it does clear itself if the resource that showed it stops. - A prompt is too big / too small — tune
Config.Scale, or passscaleper prompt. - The theme looks wrong — check
Config.Style(andConfig.Accent) for the card + keycap colors.
Support
Need help? Visit support.benzy.lol.
Credits
Made by Samuel Benzy of Benzy Development.
Website: https://benzy.lol