Special Feature — Rich Keycaps & Badges
fs_notify includes a built-in formatting engine that automatically parses text enclosed in square brackets [...] and converts it into a 3D glass keycap badge.
💡 How It Works
Whenever a notification message contains square brackets, the UI renders the enclosed text inside a stylized glass badge with:
- JetBrains Mono / Cascadia Code bold monospace font
- Translucent glass gradient and embossed border
- Subtle drop shadow and inset highlight
- Fluid scaling that automatically adapts to the player's custom font size and screen resolution
No complicated HTML tags or markdown syntax required — just use standard brackets [like this].
🎨 Visual Preview of All Notification Types
Below is a live in-game replica of how all default notification types render when using rich keycaps and badges:
Successful13:30
Information13:30
Warning13:30
Error13:30
💻 Code Examples for Every Type
lua
-- Displays a success alert with currency and item tags
exports.fs_notify:show(
'You successfully received [$2,500] cash and [5x Diamond].',
'success',
5000,
'Successful'
)lua
-- Displays an informative keybind prompt
exports.fs_notify:show(
'Press [E] to open the garage menu or [G] to park vehicle.',
'info',
5000,
'Information'
)lua
-- Displays a warning alert with keybind interaction
exports.fs_notify:show(
'Your vehicle engine is overheating! Pull over and hold [H] to cool down.',
'warning',
6000,
'Warning'
)lua
-- Displays an error alert with required item badge
exports.fs_notify:show(
'Access denied! You need [1x Keycard] to unlock the [Vault].',
'error',
5000,
'Error'
)🌟 Common Use Cases
| Use Case | Example String | Rendered Badges |
|---|---|---|
| Keybind Prompts | 'Press [E] to search or [X] to cancel' | & |
| Financial Alerts | 'Salary deposited: [+$1,250] to bank account' | |
| Inventory Actions | 'Crafted [1x Lockpick] using [2x Scrap Metal]' | & |
| Dispatch Codes | '10-99 Panic activated near [Legion Square]' |
