⚙️Qbcore

Go qb-core/client/functions.lua - 171

function QBCore.Functions.Notify(text, texttype, length, icon)
    local msgText, msgCaption

    if type(text) == 'table' then
        msgText = text.text or 'Placeholder'
        msgCaption = text.caption or ''
    else
        msgText = text
        msgCaption = ''
    end

    local message = msgCaption ~= '' and (msgCaption .. ' - ' .. msgText) or msgText
    local notifyType = texttype or 'primary'
    local notifyTime = length or 5000

    -- Llamada a Reaver Advanced Notify
    exports['reaver_advancednotify']:showNotification(message, notifyType, notifyTime)
end

Go qb-core/client/drawtext.lua - 1

local function hideText()
    exports['reaver_advancednotify']:HideText()
end

local function drawText(text, position)
    if type(position) ~= 'string' then position = 'left' end
    
    local prefix = ''
    if position == 'left' then
        prefix = '[E] '
    elseif position == 'center' then
        prefix = '[E] '
    elseif position == 'right' then
        prefix = '[E] '
    end

    exports['reaver_advancednotify']:DrawText(prefix .. text)
end

Última actualización