tw.notif
Side: Client + Server
Native RedM notifications: right panel, left panel, and top banner.
Client Functions
tw.notif.rightSuccess(text)
Green notification with a check icon and positive sound.
| Parameter | Type | Description |
|---|---|---|
text | string | Message to display |
Returns: true
tw.notif.rightError(text)
Red notification with a cross icon and negative sound.
| Parameter | Type | Description |
|---|---|---|
text | string | Message to display |
Returns: false
tw.notif.right(text, dict, icon, color?, duration?, soundset_ref?, soundset_name?)
Full right-side notification with custom icon and sound.
| Parameter | Type | Default | Description |
|---|---|---|---|
text | string | — | Message to display |
dict | string | — | Texture dictionary |
icon | string | — | Icon name |
color | string? | "COLOR_WHITE" | Text color |
duration | integer? | 3000 | Duration in ms |
soundset_ref | string? | "Transaction_Feed_Sounds" | Sound set reference |
soundset_name | string? | "Transaction_Positive" | Sound name |
tw.notif.left(title, text, dict, icon, color?, duration?, soundset_ref?, soundset_name?)
Left-side notification with a title.
| Parameter | Type | Default | Description |
|---|---|---|---|
title | string | — | Title line |
text | string | — | Message body |
dict | string | — | Texture dictionary |
icon | string | — | Icon name |
color | string? | "COLOR_WHITE" | Text color |
duration | integer? | 3000 | Duration in ms |
soundset_ref | string? | "Transaction_Feed_Sounds" | Sound set reference |
soundset_name | string? | "Transaction_Positive" | Sound name |
tw.notif.simpleTop(title, subtitle, duration?)
Large top banner notification (mission start/end style).
| Parameter | Type | Default | Description |
|---|---|---|---|
title | string | — | Main title |
subtitle | string | — | Subtitle text |
duration | integer? | 3000 | Duration in ms |
Server Functions
Server-side functions have the same API as client, but with source as the first parameter. The notification is sent to the specified player.
tw.notif.rightSuccess(source, text)
tw.notif.rightError(source, text)
tw.notif.right(source, text, dict, icon, color?, duration?, soundset_ref?, soundset_name?)
tw.notif.left(source, title, text, dict, icon, color?, duration?, soundset_ref?, soundset_name?)
tw.notif.simpleTop(source, title, subtitle, duration?)
tw.notif.print(source, ...)
Prints a message to the target player's client console (F8).
Examples
Client-side notifications
lua
-- Success notification (green, right side)
tw.notif.rightSuccess("You found 3x Apple")
-- Error notification (red, right side)
tw.notif.rightError("Not enough inventory space")
-- Custom left notification with alert icon
tw.notif.left("Sheriff Office", "A crime has been reported", "menu_textures", "menu_icon_alert", "COLOR_RED")
-- Top banner (mission style)
tw.notif.simpleTop("Mission Complete", "You earned $50")Server-side notifications
lua
-- Send success notification to a specific player
tw.notif.rightSuccess(source, "Item added to inventory")
-- Send error notification
tw.notif.rightError(source, "You don't have enough money")
-- Print to player's console
tw.notif.print(source, "Debug: player data loaded")Notes
rightSuccessandrightErrorare convenience wrappers. Useright()for full control over icon, color, and sound.- Server-side functions trigger a client event internally, so the player must be connected.
rightSuccessalways returnstrueandrightErroralways returnsfalse, which is useful for inline returns:luaif not hasItem then return tw.notif.rightError("Missing item") end

