CreateTrayNotification
Jump to navigation
Jump to search
This functions creates a notification ballon on the desktop.
Syntax
bool createTrayNotification ( string notificationText [, string iconType = "default", bool useSound = true ] )
Required Arguments
- notificationText: The text to send in the notification.
Optional Arguments
- iconType: The notification icon type. Possible values are: "default" (the MTA icon), "info", "warning", "error"
- useSound: A boolean value indicating whether or not to play a sound when receiving the notification.
Returns
Returns true if the notification is correctly created, false otherwise.
Example
-- Note: You have to wait 30 seconds before showing another tray notification, there is no queuing -- Show a 'Hello World' notification createTrayNotification( "Hello World" ) -- Show a notification with a warning symbol createTrayNotification( "Hello World", "warning" ) -- Show a default notification without sound createTrayNotification( "Hello World", "default", false )
Example of notification on minimize MTA application
function setTrayOnMinimize( ) createTrayNotification( "We are waiting for you again...", "warning" ) end addEventHandler( "onClientMinimize", root, setTrayOnMinimize )
Changelog
Version | Description |
---|
1.5.6-9.16925 | Added support for Windows 10 |
See Also
- createTrayNotification
- downloadFile
- getDevelopmentMode
- getKeyboardLayout
- getLocalization
- isShowCollisionsEnabled
- isShowSoundEnabled
- isTransferBoxAlwaysVisible
- isTransferBoxVisible
- isTrayNotificationEnabled
- setClipboard
- setDevelopmentMode
- setTransferBoxVisible
- setWindowFlashing
- showCol
- showSound
- Shared
- addDebugHook
- base64Decode
- base64Encode
- debugSleep
- decodeString
- encodeString
- fromJSON
- generateKeyPair
- getColorFromString
- getDevelopmentMode
- getDistanceBetweenPoints2D
- getDistanceBetweenPoints3D
- getEasingValue
- getNetworkStats
- getNetworkUsageData
- getPerformanceStats
- getRealTime
- getTickCount
- getTimerDetails
- getTimers
- getFPSLimit
- getUserdataType
- getVersion
- gettok
- isTransferBoxVisible
- setTransferBoxVisible
- hash
- inspect
- interpolateBetween
- iprint
- isOOPEnabled
- isTimer
- killTimer
- md5
- passwordHash
- passwordVerify
- pregFind
- pregMatch
- pregReplace
- removeDebugHook
- resetTimer
- setDevelopmentMode
- setFPSLimit
- setTimer
- ref
- deref
- sha256
- split
- teaDecode
- teaEncode
- toJSON
- tocolor
- getProcessMemoryStats
- utfChar
- utfCode
- utfLen
- utfSeek
- utfSub
- bitAnd
- bitNot
- bitOr
- bitXor
- bitTest
- bitLRotate
- bitRRotate
- bitLShift
- bitRShift
- bitArShift
- bitExtract
- bitReplace