Skip to content

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.

ParameterTypeDescription
textstringMessage to display

Returns: true


tw.notif.rightError(text)

Red notification with a cross icon and negative sound.

ParameterTypeDescription
textstringMessage 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.

ParameterTypeDefaultDescription
textstringMessage to display
dictstringTexture dictionary
iconstringIcon name
colorstring?"COLOR_WHITE"Text color
durationinteger?3000Duration in ms
soundset_refstring?"Transaction_Feed_Sounds"Sound set reference
soundset_namestring?"Transaction_Positive"Sound name

tw.notif.left(title, text, dict, icon, color?, duration?, soundset_ref?, soundset_name?)

Left-side notification with a title.

ParameterTypeDefaultDescription
titlestringTitle line
textstringMessage body
dictstringTexture dictionary
iconstringIcon name
colorstring?"COLOR_WHITE"Text color
durationinteger?3000Duration in ms
soundset_refstring?"Transaction_Feed_Sounds"Sound set reference
soundset_namestring?"Transaction_Positive"Sound name

tw.notif.simpleTop(title, subtitle, duration?)

Large top banner notification (mission start/end style).

ParameterTypeDefaultDescription
titlestringMain title
subtitlestringSubtitle text
durationinteger?3000Duration 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

  • rightSuccess and rightError are convenience wrappers. Use right() for full control over icon, color, and sound.
  • Server-side functions trigger a client event internally, so the player must be connected.
  • rightSuccess always returns true and rightError always returns false, which is useful for inline returns:
    lua
    if not hasItem then return tw.notif.rightError("Missing item") end

Premium RedM Scripts — Multi-Framework