config_functions
ESX = exports.es_extended:getSharedObject()
function Notify(msg, type, time)
if Config.Notify == "standalone" then
BeginTextCommandThefeedPost("STRING")
AddTextComponentSubstringPlayerName(msg)
EndTextCommandThefeedPostTicker(true, true)
elseif Config.Notify == "okok" then
exports['okokNotify']:Alert('Blackmarket', msg, 5000, type, true)
elseif Config.Notify == "ox" then
lib.notify({ title = 'Blackmarket', description = msg, type = type })
elseif Config.Notify == "esx" then
ESX.ShowNotification(msg, type, time)
end
end
function GetNumberSerie()
local serie = {}
serie[#serie + 1] = tostring(RandomInt(2) .. RandomStr(3) .. RandomInt(1) .. RandomStr(2) .. RandomInt(3) .. RandomStr(4))
return serie
end
function RandomInt(max)
return math.random(max)
end
function RandomStr(length)
local charset = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
local result = ""
for _ = 1, length do
local randomIndex = math.random(#charset)
result = result .. charset:sub(randomIndex, randomIndex)
end
return result
end
Last updated