Skip to content

Commit a12bf73

Browse files
committed
Update v1.7.5
* New Notification UI
1 parent 4d269c0 commit a12bf73

File tree

4 files changed

+15
-19
lines changed

4 files changed

+15
-19
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.7.4
1+
1.7.5

client.lua

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,21 +41,20 @@ MSK.Split = function(str, delimiter)
4141
return result
4242
end
4343

44-
MSK.Notification = function(message, info, duration, playSound)
44+
MSK.Notification = function(title, message, info, time)
4545
if Config.Notification == 'native' then
4646
SetNotificationTextEntry('STRING')
4747
AddTextComponentString(message)
4848
DrawNotification(false, true)
4949
else
5050
SendNUIMessage({
51+
action = 'notify',
52+
title = title,
5153
message = message,
52-
duration = duration or 5000,
53-
type = info or 'default',
54-
map = IsRadarEnabled()
54+
info = info or 'general',
55+
time = time or 5000
5556
})
5657
end
57-
58-
if playSound then PlaySoundFrontend(-1, "ATM_WINDOW", "HUD_FRONTEND_DEFAULT_SOUNDSET", 1) end
5958
end
6059

6160
MSK.HelpNotification = function(text)
@@ -225,8 +224,8 @@ AddEventHandler("msk_core:responseCallback", function(requestId, ...)
225224
end)
226225

227226
RegisterNetEvent("msk_core:notification")
228-
AddEventHandler("msk_core:notification", function(message, info, duration, playSound)
229-
MSK.Notification(message, info, duration, playSound)
227+
AddEventHandler("msk_core:notification", function(title, message, info, time)
228+
MSK.Notification(title, message, info, time)
230229
end)
231230

232231
RegisterNetEvent('msk_core:advancedNotification')

fxmanifest.lua

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ games { 'gta5' }
44
author 'Musiker15 - MSK Scripts'
55
name 'msk_core'
66
description 'Core functions for MSK Scripts'
7-
version '1.7.4'
7+
version '1.7.5'
88

99
lua54 'yes'
1010

@@ -24,16 +24,11 @@ server_scripts {
2424
'server_*.lua'
2525
}
2626

27-
files {
28-
'import.lua'
29-
}
30-
3127
ui_page 'html/index.html'
3228

3329
files {
34-
'html/index.html',
35-
'html/style.css',
36-
'html/script.js'
30+
"html/**/*.*",
31+
'import.lua'
3732
}
3833

3934
dependencies {

server.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,13 @@ MSK.RegisterCommand = function(name, group, cb, console, framework, suggestion)
135135
end
136136
end
137137

138-
MSK.Notification = function(src, message, info, duration, playSound)
139-
TriggerClientEvent('msk_core:notification', src, message, info, duration, playSound)
138+
MSK.Notification = function(src, title, message, info, time)
139+
if not src or src == 0 then return end
140+
TriggerClientEvent('msk_core:notification', src, title, message, info, time)
140141
end
141142

142143
MSK.AdvancedNotification = function(src, text, title, subtitle, icon, flash, icontype)
144+
if not src or src == 0 then return end
143145
TriggerClientEvent('msk_core:advancedNotification', src, text, title, subtitle, icon, flash, icontype)
144146
end
145147

0 commit comments

Comments
 (0)