@@ -7,6 +7,12 @@ MSK.Notification = function(title, message, typ, duration)
7
7
exports .okokNotify :Alert (title , message , duration or 5000 , typ or ' info' )
8
8
elseif Config .Notification == ' qb-core' then
9
9
QBCore .Functions .Notify (message , typ , duration )
10
+ elseif Config .Notification == ' bulletin' then
11
+ exports .bulletin :Send ({
12
+ message = message ,
13
+ timeout = duration or 5000 ,
14
+ theme = typ or ' info'
15
+ })
10
16
elseif Config .Notification == ' custom' then
11
17
Config .customNotification (title , message , typ or ' info' , duration or 5000 )
12
18
else
@@ -23,10 +29,16 @@ MSK.Notify = MSK.Notification
23
29
exports (' Notification' , MSK .Notification )
24
30
RegisterNetEvent (" msk_core:notification" , MSK .Notification )
25
31
26
- MSK .HelpNotification = function (text )
27
- BeginTextCommandDisplayHelp (' STRING' )
28
- AddTextComponentSubstringPlayerName (text )
29
- EndTextCommandDisplayHelp (0 , false , true , - 1 )
32
+ MSK .HelpNotification = function (text , key )
33
+ if Config .HelpNotification == ' native' then
34
+ BeginTextCommandDisplayHelp (' STRING' )
35
+ AddTextComponentSubstringPlayerName (text )
36
+ EndTextCommandDisplayHelp (0 , false , true , - 1 )
37
+ elseif Config .HelpNotification == ' custom' then
38
+ Config .customHelpNotification (text )
39
+ else
40
+ MSK .TextUI .ShowThread (key , text )
41
+ end
30
42
end
31
43
MSK .HelpNotify = MSK .HelpNotification
32
44
exports (' HelpNotification' , MSK .HelpNotification )
@@ -37,10 +49,22 @@ MSK.AdvancedNotification = function(text, title, subtitle, icon, flash, icontype
37
49
if not icontype then icontype = 1 end
38
50
if not icon then icon = ' CHAR_HUMANDEFAULT' end
39
51
40
- BeginTextCommandThefeedPost (' STRING' )
41
- AddTextComponentSubstringPlayerName (text )
42
- EndTextCommandThefeedPostMessagetext (icon , icon , flash , icontype , title , subtitle )
43
- EndTextCommandThefeedPostTicker (false , true )
52
+ if Config .AdvancedNotification == ' bulletin' and GetResourceState (' bulletin' ) == ' started' then
53
+ exports .bulletin :SendAdvanced ({
54
+ message = text ,
55
+ title = title ,
56
+ subject = subtitle ,
57
+ icon = icon ,
58
+ timeout = 5000
59
+ })
60
+ elseif Config .AdvancedNotification == ' custom' then
61
+ Config .customAdvancedNotification (text , title , subtitle , icon , flash , icontype )
62
+ else
63
+ BeginTextCommandThefeedPost (' STRING' )
64
+ AddTextComponentSubstringPlayerName (text )
65
+ EndTextCommandThefeedPostMessagetext (icon , icon , flash , icontype , title , subtitle )
66
+ EndTextCommandThefeedPostTicker (false , true )
67
+ end
44
68
end
45
69
MSK .AdvancedNotify = MSK .AdvancedNotification
46
70
exports (' AdvancedNotification' , MSK .AdvancedNotification )
0 commit comments