createTrayNotification | Multi Theft Auto: Wiki Skip to content

createTrayNotification

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function creates a notification balloon on the desktop.

Note

MTA won't show any tray notifications if the MTA window is focused, because there is no reason to show tray notifications if you are in-game. If you want to test this function you should use a Timer and switch to your desktop.

Note

You can only show a tray notification every 30 seconds.

Syntax

createTrayNotification ( )

Code Examples

client
-- Note: You have to wait 30 seconds before showing another tray notification, there is no queuing
createTrayNotification("Hello World") -- Show a 'Hello World' notification
createTrayNotification("Hello World", "warning") -- Show a notification with a warning symbol
createTrayNotification("Hello World", "default", false) -- Show a default notification without sound