-
Notifications
You must be signed in to change notification settings - Fork 55
LUA ‐ How to use messageboxes and notifications
There's honestly not a lot to talk about the Windows notification, except this only supports windows.

The ways to make a Windows notification happen is to use an event or a lua line.
Here are the ways on how to make one happen:
- Chart Editor Event (Windows Notification Event)
triggerEvent('Windows Notification', 'title', 'info/message')runHaxeCode([[sendWindowsNotification('title', 'info/message');]])
Explainable things, title is the title, info/message is the text you want it to talk about.
This may seem like nonsense, but one of the most important uses for the messagebox is debugging code and "breaking the fourth wall" using simple tools.
Lua:
To make the game pause: triggerEvent('Popup', 'title', 'info/message')
To make the game not pause: triggerEvent('Popup (No Pause)', 'title', 'info/message')
Here's an example of the player's botplay being forced off.
THIS WAS MADE WITHOUT ANY TESTING, PLEASE MAKE A DISCUSSION PAGE IF THIS DOES NOT WORK
function onCreatePost()
notifTitle = 'Jordan Santiago'
notifMessage = 'Nope! Fuck you!'
-- change the notifTitle and notifMessage if you want to, it has to be in a string format, or it will not work.
if botplay then
triggerEvent('Windows Notification', notifTitle, notifMessage)
setPropertyFromClass('ClientPrefs', 'botplay', false)
end
end
function onResume()
runTimer('check thingy', 0.05)
end
function onTimerCompleted(tag)
if tag == 'check thingy' then
if botplay then
triggerEvent('Windows Notification', notifTitle, notifMessage)
setPropertyFromClass('ClientPrefs', 'botplay', false)
end
end
end