Functions

local QBCore = exports[Config.Core]:GetCoreObject()

function Notify(msg, type, time)
    if Config.Notify == "qb" then
        QBCore.Functions.Notify(msg, type, time)
    elseif Config.Notify == "okok" then
        exports['okokNotify']:Alert('Crafting', msg, 5000, type, true)
    elseif Config.Notify == "ox" then
        lib.notify({ title = 'Crafting', description = msg, type = type })
    end
end

function SendHelpText(msg, position)
    if Config.HelpText == "qb" then
        exports['qb-core']:DrawText(msg, position)
    elseif Config.HelpText == "ox" then
        lib.showTextUI(msg)
    end
end

function RemoveHelpText()
    if Config.HelpText == "qb" then
        exports['qb-core']:HideText()
    elseif Config.HelpText == "ox" then
        lib.hideTextUI()
    end
end

function GetNumberSerie()
    local serie = {}
    serie[#serie + 1] = tostring(QBCore.Shared.RandomInt(2) .. QBCore.Shared.RandomStr(3) .. QBCore.Shared.RandomInt(1) .. QBCore.Shared.RandomStr(2) .. QBCore.Shared.RandomInt(3) .. QBCore.Shared.RandomStr(4))
    return serie
end

Last updated