functionESX.ShowNotification(message,type,length)if (GetResourceState("rat-notify") =="missing") then Citizen.Trace("^8ERROR ^7rat-notify is not present or started.")returnendlocal title ="Notify"local style ="default"if (type=="info" ortype=="success" ortype=="error") then title =type:gsub("^%1", string.upper) style =typeend exports["rat-notify"]:Add({ title = title, text = message, style = style, duration = length or5000 })end
functionQBCore.Functions.Notify(text,texttype,length,icon)if (GetResourceState("rat-notify") =="missing") then Citizen.Trace("^8ERROR ^7rat-notify is not present or started.")returnendif (icon) then icon = (icon):gsub("fas", "fa-solid") endlocal t ="info"if (texttype) then t = texttype end-- Capitalize the first letter of `texttype`local title = t:gsub("^%l", string.upper) exports["rat-notify"]:Add({ title = title, text = text, style = t, duration = length or5000 })end
functionlib.notify(data)local position = data.position or settings.notification_positionif ( GetResourceState('rat-notity') =="missing" ) then Citizen.Trace("^8ERROR ^7rat-notify is not present or started.")returnend exports["rat-notify"]:Add({ id = data.id, title = data.title, text = data.description, duration = data.duration, style = data.type, icon = data.icon, pos = position })end