Skip to content

Commit 7ae32f1

Browse files
committed
Update v2.4.8
1 parent 58971b3 commit 7ae32f1

File tree

5 files changed

+52
-22
lines changed

5 files changed

+52
-22
lines changed

client/functions/input.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ MSK.Register('msk_core:input', function(source, header, placeholder, field)
5454
return MSK.Input.Open(header, placeholder, field)
5555
end)
5656

57+
MSK.Input.Active = function()
58+
return isInputOpen
59+
end
60+
exports('InputActive', MSK.Input.Active)
61+
5762
RegisterNUICallback('submitInput', function(data)
5863
if data.input == '' then data.input = nil end
5964
if tonumber(data.input) then data.input = tonumber(data.input) end

client/functions/main.lua

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -200,27 +200,6 @@ MSK.GetPedMugshot = function(ped, transparent)
200200
end
201201
exports('GetPedMugshot', MSK.GetPedMugshot)
202202

203-
MSK.Progressbar = function(time, text, color)
204-
SendNUIMessage({
205-
action = 'progressBarStart',
206-
time = time,
207-
text = text or '',
208-
color = color or Config.progressColor,
209-
})
210-
end
211-
MSK.ProgressStart = MSK.Progressbar -- Support for old Scripts
212-
exports('Progressbar', MSK.Progressbar)
213-
exports('ProgressStart', MSK.Progressbar) -- Support for old Scripts
214-
RegisterNetEvent("msk_core:progressbar", MSK.Progressbar)
215-
216-
MSK.ProgressStop = function()
217-
SendNUIMessage({
218-
action = 'progressBarStop',
219-
})
220-
end
221-
exports('ProgressStop', MSK.ProgressStop)
222-
RegisterNetEvent("msk_core:progressbarStop", MSK.ProgressStop)
223-
224203
MSK.LoadAnimDict = function(dict)
225204
assert(dict and DoesAnimDictExist(dict), 'Parameter "dict" is nil or the AnimDict does not exist')
226205

client/functions/numpad.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ MSK.Register('msk_core:numpad', function(source, pin, show)
5555
return MSK.Numpad.Open(pin, show)
5656
end)
5757

58+
MSK.Numpad.Active = function()
59+
return isNumpadOpen
60+
end
61+
exports('NumpadActive', MSK.Numpad.Active)
62+
5863
RegisterNUICallback('submitNumpad', function(data)
5964
callback(true)
6065
MSK.Numpad.Close()

client/functions/progressbar.lua

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
MSK.Progress = {}
2+
3+
local isProgressOpen = false
4+
5+
MSK.Progress.Start = function(time, text, color)
6+
if isProgressOpen then
7+
MSK.Progress.Stop()
8+
end
9+
isProgressOpen = true
10+
11+
SendNUIMessage({
12+
action = 'progressBarStart',
13+
time = time,
14+
text = text or '',
15+
color = color or Config.progressColor,
16+
})
17+
18+
SetTimeout(time, function()
19+
isProgressOpen = false
20+
end)
21+
end
22+
MSK.Progressbar = MSK.Progress.Start -- Support for old Scripts
23+
exports('Progressbar', MSK.Progress.Start)
24+
exports('ProgressbarStart', MSK.Progress.Start) -- Support for old Scripts
25+
RegisterNetEvent("msk_core:progressbar", MSK.Progress.Start)
26+
27+
MSK.Progress.Stop = function()
28+
SendNUIMessage({
29+
action = 'progressBarStop',
30+
})
31+
32+
isProgressOpen = false
33+
end
34+
MSK.ProgressStop = MSK.Progress.Stop -- Support for old Scripts
35+
exports('ProgressStop', MSK.Progress.Stop) -- Support for old Scripts
36+
RegisterNetEvent("msk_core:progressbarStop", MSK.Progress.Stop)
37+
38+
MSK.Progress.Active = function()
39+
return isProgressOpen
40+
end
41+
exports('ProgressActive', MSK.Progress.Active)

fxmanifest.lua

Lines changed: 1 addition & 1 deletion
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 'Functions for MSK Scripts'
7-
version '2.4.7'
7+
version '2.4.8'
88

99
lua54 'yes'
1010

0 commit comments

Comments
 (0)