This will just use the generic frameworks notification system you could add more here too in the files if you know how
Core.UI.Notify("My Notification")
SimpleNotify
This is my take on simple notifications if you want to use this you can
Core.UI.SimpleNotification({
ID = "thisNotif",
Title = "Test Notification",
Message = "This is a test notification",
Icon = "fa-solid fa-user-friends", --##
Time = 5, --## If no Time then it will never remove
NoTimer = true, --## Remove the timer at the bottom
})
Event
TriggerEvent("Dirk-Core:UI:SimpleNotify", { --## Can also be TriggerClientEvent from server side too obviously
ID = "thisNotif",
Title = "Test Notification",
Message = "This is a test notification",
Icon = "fa-solid fa-user-friends", --##
Time = 5, --## If no Time then it will never remove
NoTimer = true, --## Remove the timer at the bottom
})
ShowHelpNotification
Basics boring ShowHelpNotification you see in normal Grand Theft Auto
while true do
Core.UI.ShowHelpNotification("This is what I want to display")
Wait(0)
end
AdvancedHelpNotif
My take on ShowHelpNotif
while true do
Core.UI.AdvancedHelpNotif("plantID", {
{
label = "Place",
key = "g",
},
{
label = "Cancel",
key = "f",
},
})
Wait(0)
end
ProgressBar
--## Supports ox_lib and progressBars
Core.UI.ProgressBar({
time = 5000,
label = "Test Progress",
usewhileDead = false,
canCancel = false,
disableControl = true,
}, function(complete)
print('Complete ', complete) --## Prints true if bar complete or false if cancelled
end)
KeyCode
local correct = Core.UI.KeyCode(1234) --## Can be as long a number as you wish
CopyToClipboard
Core.UI.CopyToClipboard("What I want to copy to my clipboard")
OpenLink
Core.UI.OpenLink("www.google.com") --## Will open this link in the clients browser
PlotPoints
local points = Core.Game.PlotPoints()
print(json.encode(points))
--## This will return a table points you have selected via the in-game prompts.