fix(qb-core): post-update recovery + centralizare notify 17mov_Hud
Restaurat jobs.lua din git (Quasar fork a suprascris joburile 17mov). Adăugat item map în items.lua (lipsea, rupt rv-maphold). Setat licences.driver = false în config.lua. Override QBCore.Functions.Notify + QBCore:Notify event → 17mov_Hud:ShowNotification (toate notificările merg automat prin 17mov_Hud).
This commit is contained in:
@@ -12,11 +12,57 @@ if wasabi_uikit == 'started' or wasabi_uikit == 'starting' then uikitFound = tru
|
||||
|
||||
-- Notifications
|
||||
function WSB.showNotification(title, desc, style, icon, id)
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
local message = desc and (title .. ' - ' .. desc) or title
|
||||
local notifyType = style or 'primary'
|
||||
|
||||
QBCore.Functions.Notify(message, notifyType)
|
||||
-- Edit code below to use your own notification system
|
||||
|
||||
-- (This supports wasabi_notify, bridge's built-in notify, and ox_lib is commented out if desired!)
|
||||
-- Get wasabi_notify here: https://wasabiscripts.com/product/6215100
|
||||
|
||||
if GetResourceState('wasabi_notify') == 'started' then -- If using wasabi_notify, automatic detection
|
||||
if style == 'inform' or style == 'primary' then style = 'info' end
|
||||
|
||||
return exports.wasabi_notify:notify(title, desc, Config.Notifications.defaults.time or 3500, style or 'info',
|
||||
Config.NotificationSound or Config.Notifications.defaults.sound or false, icon, id)
|
||||
end
|
||||
|
||||
if uikitFound then
|
||||
return exports.wasabi_uikit:Notification(title, desc, style or 'info', id, icon)
|
||||
end
|
||||
|
||||
--[[ Remove this line if you are using lation_ui: https://lationscripts.com/product/modern-ui
|
||||
if GetResourceState('lation_ui') == 'started' then -- If using lation_ui and not wasabi_notify automatic detection
|
||||
if style == 'inform' or style == 'primary' then style = 'info' end
|
||||
|
||||
return exports.lation_ui:notify({
|
||||
title = title,
|
||||
message = desc or nil,
|
||||
id = id or nil,
|
||||
position = 'top-right',
|
||||
icon = icon or nil,
|
||||
duration = 3500,
|
||||
type = style or 'info'
|
||||
})
|
||||
end
|
||||
]] -- Remove this line if you are using lation_ui
|
||||
|
||||
--[[
|
||||
if GetResourceState('ox_lib') == 'started' then -- If using ox_lib and not wasabi_notfy automatic detection
|
||||
if style == 'info' then style = 'inform' end
|
||||
exports.ox_lib:notify({
|
||||
title = title,
|
||||
description = desc or false,
|
||||
id = id or false,
|
||||
position = 'top-right',
|
||||
icon = icon or false,
|
||||
duration = 3500,
|
||||
type = style or 'inform'
|
||||
})
|
||||
return
|
||||
end
|
||||
]] --
|
||||
|
||||
return ShowNotification(title, desc, style, icon, id) -- Default bridge built-in notification system
|
||||
|
||||
-- Edit Code above to use your own notification system
|
||||
end
|
||||
|
||||
RegisterNetEvent('wasabi_bridge:notify', function(title, desc, style, icon, id)
|
||||
|
||||
Reference in New Issue
Block a user