M MY Multiplayer: Wiki
Side
Kind

createTrayNotification

Client

Shows a system notification in the Windows tray, while the game is not focused.

bool createTrayNotification(string text [, string icon = "default", bool sound = true])

Parameters

NameTypeDescription
textstringThe notification's text.
iconstring"default", "info", "warning" or "error".default "default"
soundboolWhether the notification plays the system sound.default true

Returns

true if the notification was shown. false if the game window is focused or another notification was shown less than 30 seconds ago.

Example

addEvent("onRaceStart", true)
addEventHandler("onRaceStart", root, function()
    createTrayNotification("The race is starting!", "info")
end)

See also