ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Client functions
  3. createTrayNotification

Function

createTrayNotification

ClientInput and controlsIdentical to MTA:SA

Shows a Windows system notification next to the clock (useful when the game is minimised). In the current client version the function is not wired to the game yet and returns false with a console warning; isTrayNotificationEnabled tells whether it works already.

Syntax

bool createTrayNotification(string text [, string iconType = "default", bool useSound = true])

Arguments

textstring
Notification text.
iconTypestring, optional = "default"
Icon: "default", "info", "warning", "error".
useSoundbool, optional = true
Whether to play a sound.

Returns

true if the notification was shown.

Example

if isTrayNotificationEnabled() then
    createTrayNotification("Twój wyścig zaraz się zaczyna!", "info")
end

See also