Integrations & Replacements
🔌
One change, zero script rewiring
Override your framework’s core notification function once and every script on your server immediately routes through Mizu Interface automatically.
⚠️
Warning
These edits modify framework core files. Always back up before making changes. The modifications are minimal, safe, and fully reversible.
Framework Integrations
QBCore

QBCore - qb-core
Client-side
File: qb-core/client/functions.lua
Search for: function QBCore.Functions.Notify(text, texttype, length, icon)
Replace the entire function with:
function QBCore.Functions.Notify(text, texttype, length)
if type(text) == "table" then
exports['mizu_interface']:Notify({
title = text.caption or 'SYSTEM',
message = text.text or 'Placeholder',
type = texttype or 'info',
duration = length or 5000
})
else
exports['mizu_interface']:Notify({
message = text,
type = texttype or 'info',
duration = length or 5000
})
end
endServer-side
File: qb-core/server/functions.lua
Search for: function QBCore.Functions.Notify(source, text, type, length)
Replace with:
function QBCore.Functions.Notify(source, text, type, length)
TriggerClientEvent('mizu_interface:client:Notify', source, {
message = text,
type = type or 'info',
duration = length or 5000
})
endProgress Bar Integration
Instead of globally replacing the progress bar across your framework, we recommend replacing it directly in scripts that use it. This ensures maximum stability and protects items from cancel-exploit duplication.
Example: Drinking Water (qb-smallresources)
RegisterNetEvent('consumables:client:Drink', function(itemName)
exports.mizu_interface:ProgressBar({
duration = 5000,
label = Lang:t('consumables.drink_progress'),
icon = 'bottle-water',
canCancel = true,
disable = {
movement = false,
car = false,
mouse = false,
combat = true,
inventory = true
},
animation = {
animDict = 'mp_player_intdrink',
anim = 'loop_bottle',
flags = 49
},
prop = {
model = 'vw_prop_casino_water_bottle_01a',
bone = 60309,
coords = vec3(0.0, 0.0, -0.05),
rotation = vec3(0.0, 0.0, -40.0)
},
onFinish = function(isCanceled)
if not isCanceled then
TriggerEvent('qb-inventory:client:ItemBox', QBCore.Shared.Items[itemName], 'remove')
TriggerServerEvent('consumables:server:addThirst', ...)
else
QBCore.Functions.Notify(Lang:t('consumables.canceled'), 'error')
TriggerServerEvent('QBCore:Server:AddItem', itemName, 1)
end
end
})
end)Last updated on

