Accessible code

------------------------------------------------------------------------------------

function SendNotification(message, type)
    if NotificationSystem == "esx" then
        ESX.ShowNotification(message)
    elseif NotificationSystem == "custom" then
        -- Custom notification system implementation here
    end
end

RegisterNetEvent('uniq-stocks:Notify', function(message, messageType)
    SendNotification(message, messageType)
    
    if messageType == "error" then
        hideUI()
        
        if tabletObj then
            DeleteEntity(tabletObj)
            tabletObj = nil
            
            local ped = PlayerPedId()
            ClearPedTasks(ped)
        end
    end
end)

------------------------------------------------------------------------------------

Last updated