Skip to content

Commit 01234ff

Browse files
committed
Updated v1.5
* Added MSK.Comma function
1 parent f22a74c commit 01234ff

File tree

5 files changed

+34
-4
lines changed

5 files changed

+34
-4
lines changed

VERSION

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

client.lua

+15
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,21 @@ MSK.Table_Contains = function(table, value)
123123
return false
124124
end
125125

126+
MSK.Comma = function(int, tag)
127+
if not tag then tag = '.' end
128+
local newInt = int
129+
130+
while true do
131+
newInt, k = string.gsub(newInt, "^(-?%d+)(%d%d%d)", '%1'..tag..'%2')
132+
133+
if (k == 0) then
134+
break
135+
end
136+
end
137+
138+
return newInt
139+
end
140+
126141
MSK.logging = function(script, code, ...)
127142
if code == 'error' then
128143
print(script, '[^1ERROR^0]', ...)

config.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ Config = {}
22
----------------------------------------------------------------
33
Config.VersionChecker = true
44
----------------------------------------------------------------
5-
-- Only Required for MSK.RegisterCommand and MSK.HasItem // View Wiki for more Information about that!
5+
-- Only Required for MSK.RegisterCommand // View Wiki for more Information about that!
66
Config.Framework = 'esx' -- Set to 'standalone', 'esx' or 'qbcore'
77
----------------------------------------------------------------

fxmanifest.lua

+1-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.4.4'
7+
version '1.5'
88

99
lua54 'yes'
1010

server.lua

+16-1
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,21 @@ MSK.RegisterCallback('msk_core:hasItem', function(source, cb, item)
236236
cb(MSK.HasItem(xPlayer, item))
237237
end)
238238

239+
MSK.Comma = function(int, tag)
240+
if not tag then tag = '.' end
241+
local newInt = int
242+
243+
while true do
244+
newInt, k = string.gsub(newInt, "^(-?%d+)(%d%d%d)", '%1'..tag..'%2')
245+
246+
if (k == 0) then
247+
break
248+
end
249+
end
250+
251+
return newInt
252+
end
253+
239254
RegisterNetEvent('msk_core:triggerCallback')
240255
AddEventHandler('msk_core:triggerCallback', function(name, requestId, ...)
241256
local src = source
@@ -292,7 +307,7 @@ GithubUpdater = function()
292307
print(resourceName .. '^2 ✓ Resource is Up to Date^0 - ^5Current Version: ^2' .. CurrentVersion .. '^0')
293308
elseif CurrentVersion ~= NewestVersion then
294309
print(resourceName .. '^1 ✗ Resource Outdated. Please Update!^0 - ^5Current Version: ^1' .. CurrentVersion .. '^0')
295-
print('^5Newest Version: ^2' .. NewestVersion .. '^0 - ^6Download here:^9 https://github.com/MSK-Scripts/msk_core ^0')
310+
print('^5Newest Version: ^2' .. NewestVersion .. '^0 - ^6Download here:^9 https://github.com/MSK-Scripts/msk_core/releases/tag/v'.. NewestVersion .. '^0')
296311
end
297312
print("###############################")
298313
end)

0 commit comments

Comments
 (0)