1️⃣ Dependencies
This script requires oxmysql to function properly.
2️⃣ Add Files to Your Server Place the janiel-notify folder inside resources/.
Add the following line to your server.cfg:
ensure janiel-notify
SQL Table Structure
The notify.sql file will automatically create the notify_settings table in your database, which will store player notification positions. Here's the table structure:
CREATE TABLE IF NOT EXISTS notify_settings (
id INT AUTO_INCREMENT PRIMARY KEY,
identifier VARCHAR(50) NOT NULL UNIQUE,
position TEXT NOT NULL
);
🛠 QBCore Integration
📌 Override QBCore Notifications
Add the following code to qb-core/client/functions.lua:
function QBCore.Functions.Notify(text, texttype, length)
exports['janiel-notify']:Notify(text, texttype, length)
end
--function QBCore.Functions.Notify(text, texttype, length)
-- if type(text) == "table" then
-- local ttext = text.text or 'Placeholder'
-- local caption = text.caption or 'Placeholder'
-- texttype = texttype or 'primary'
-- length = length or 5000
-- SendNUIMessage({
-- action = 'notify',
-- type = texttype,
-- length = length,
-- text = ttext,
-- caption = caption
-- })
-- else
-- texttype = texttype or 'primary'
-- length = length or 5000
-- SendNUIMessage({
-- action = 'notify',
-- type = texttype,
-- length = length,
-- text = text
-- })
-- end
--end