Skip to content

Commit 5b59a0e

Browse files
committed
Update v1.6
* Added import.lua * Added MSK.AdvancedNotification
1 parent 01234ff commit 5b59a0e

File tree

5 files changed

+27
-2
lines changed

5 files changed

+27
-2
lines changed

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.5
1+
1.6

client.lua

+16
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,17 @@ MSK.HelpNotification = function(text)
4444
DisplayHelpTextFromStringLabel(0, 0, 1, -1)
4545
end
4646

47+
MSK.AdvancedNotification = function(text, title, subtitle, icon, flash, icontype)
48+
if not flash then flash = true end
49+
if not icontype then icontype = 1 end
50+
if not icon then icon = 'CHAR_HUMANDEFAULT' end
51+
52+
SetNotificationTextEntry('STRING')
53+
AddTextComponentString(text)
54+
SetNotificationMessage(icon, icon, flash, icontype, title, subtitle)
55+
DrawNotification(false, true)
56+
end
57+
4758
MSK.Draw3DText = function(coords, text, size, font)
4859
local coords = type(coords) == "vector3" and coords or vec(coords.x, coords.y, coords.z)
4960
local camCoords = GetGameplayCamCoords()
@@ -174,6 +185,11 @@ AddEventHandler("msk_core:notification", function(text)
174185
MSK.Notification(text)
175186
end)
176187

188+
RegisterNetEvent('msk_core:advancedNotification')
189+
AddEventHandler('msk_core:advancedNotification', function(text, title, subtitle, icon, flash, icontype)
190+
MSK.AdvancedNotification(text, title, subtitle, icon, flash, icontype)
191+
end)
192+
177193
CreateThread(function()
178194
while true do
179195
local sleep = 200

fxmanifest.lua

+5-1
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.5'
7+
version '1.6'
88

99
lua54 'yes'
1010

@@ -21,6 +21,10 @@ server_scripts {
2121
'server.lua'
2222
}
2323

24+
files {
25+
'import.lua'
26+
}
27+
2428
dependencies {
2529
'oxmysql'
2630
}

import.lua

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
MSK = exports.msk_core:getCoreObject()

server.lua

+4
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@ MSK.Notification = function(src, text)
130130
TriggerClientEvent('msk_core:notification', src, text)
131131
end
132132

133+
MSK.AdvancedNotification = function(src, text, title, subtitle, icon, flash, icontype)
134+
TriggerClientEvent('msk_core:advancedNotification', src, text, title, subtitle, icon, flash, icontype)
135+
end
136+
133137
MSK.AddWebhook = function(webhook, botColor, botName, botAvatar, title, description, fields, footer, time)
134138
local content = {}
135139

0 commit comments

Comments
 (0)