A lightweight, secure, and polished RP chat bubble system for FiveM.
cbk-headsup gives players a clean input panel and renders proximity-based chat bubbles above player heads with distance fade, sanitization, and anti-spam protections.
- Standalone (no framework dependency)
- Proximity broadcast (server-side distance filtering)
- On-screen bubble rendering with world-to-screen projection
- Distance fade for readability
- Built-in rate limiting and text sanitization
- Blocklist support for links/advertising text
- Draggable input panel UI
- Compact, high-visibility bubble style tuned for RP
Current version: 1.0.1
cbk-headsup/
fxmanifest.lua
LICENSE
CHANGELOG.md
README.md
shared/
config.lua
client/
main.lua
server/
server.lua
ui/
index.html
style.css
script.js
- Place
cbk-headsupin your serverresourcesfolder. - Add this line to your
resources.cfg:
ensure cbk-headsup- Restart the server or run:
restart cbk-headsupDefault open command:
/bubbleui
Default keybind:
F2
Both are configurable in shared/config.lua.
All settings are in shared/config.lua.
Config.CommandConfig.Keybind
Config.DisplayTimeMs: how long a bubble stays visibleConfig.MaxLength: max message lengthConfig.MaxLines: reserved for presentation limits
Config.RenderDistance: client render distance for visible bubblesConfig.ServerBroadcastDistance: who receives bubble updates from server
Config.RateLimitMs: per-player send cooldownConfig.RenderTickMs: UI refresh cadence when bubbles are visible
Config.WorldZOffset: vertical bubble anchor above pedConfig.DistanceFadeStart: fade begins at this distance
Config.BlockedSubstrings: plain-text blocklist entriesConfig.NormalizeWhitespace: normalize whitespace and control characters
Server-side checks in server/server.lua include:
- Text type validation
- Control character cleanup
- Whitespace normalization (optional)
- Trimming and empty message rejection
- Max length enforcement
- Blocklist substring rejection
- Per-player rate limiting
This keeps the client UI simple while ensuring authoritative server validation.
- Player opens UI (
/bubbleuior keybind F2). - NUI sends message to client callback (
send). - Client triggers server event:
ultra_chatbubble:send. - Server sanitizes/rate-limits and sends to nearby players.
- Clients render active bubbles with world-space tracking + fade.
ultra_chatbubble:send(client -> server)
ultra_chatbubble:setBubbleultra_chatbubble:clearBubble
- Input panel can be dragged by header.
- NUI close/send use callback POSTs and proper CSP connect policy.
- Panel focus is released cleanly on close and on resource stop.
- Confirm
ensure cbk-headsupis present and resource started. - Verify no keybind conflict with
Config.Keybind.
- Make sure players are within
Config.ServerBroadcastDistance. - Increase
Config.RenderDistanceif needed. - Adjust
Config.WorldZOffsetfor ped/model camera angle differences.
- Check
Config.RateLimitMs(anti-spam cooldown). - Check
Config.BlockedSubstringsand sanitization constraints.
See CHANGELOG.md for release history.
See LICENSE.