-- Example 1: Using Predefined Styleexports["is_ui"]:Notify("Test", "Lorem ipsum <span>adipiscing elit</span>.", 5000, "info")-- Example 2: Using Predefined Style with Custom Iconexports["is_ui"]:Notify("Test", "Lorem ipsum adipiscing elit.", 5000, "info", "fa-regular fa-thumbs-up")-- Example 3: Using Custom Stylelocal style = { icon ="fa-solid fa-sack-dollar", primaryColor ="#FF425D", backgroundIcon = { from ="#FC3955", to ="#861A20" }, sound = { play =true, type ="notifySound6", volume =5 }}exports["is_ui"]:Notify("Test", "Lorem adipiscing elit.", 5000, style)
-- Example 1: Using Predefined StyleTriggerClientEvent("is_ui:Notify", source, "Test", "Lorem ipsum <span>adipiscing elit</span>.", 5000, "info")-- Example 2: Using Predefined Style with Custom IconTriggerClientEvent("is_ui:Notify", source, "Test", "Lorem ipsum adipiscing elit.", 5000, "info", "fa-regular fa-thumbs-up")
-- Example 3: Using Custom Stylelocal style = { icon ="fa-solid fa-sack-dollar", primaryColor ="#FF425D", backgroundIcon = { from ="#FC3955", to ="#861A20" }, sound = { play =true, type ="notifySound6", volume =5 }}TriggerClientEvent("is_ui:Notify", "Test", "Lorem adipiscing elit.", 5000, style)
Default Framework Notifications
To quickly change default Notifications, go to the given file and replace the functions to call our export.
QBCore
qb-core -> client -> functions.lua
functionQBCore.Functions.Notify(text,style,duration,icon,title)local title = title ornillocal icon = icon ornilif style =="primary" then style ="info" end exports["is_ui"]:Notify(title, text, tonumber(duration), style, icon)end
ESX
es_extended -> client -> functions.lua
functionESX.ShowNotification(text,style,duration,icon)local title = title ornillocal icon = icon ornil exports["is_ui"]:Notify(title, text, tonumber(duration), style, icon) end
Progress Bar
The Progress Bar can only be invoked on the Client-Side!
exports["is_ui"]:ProgressBar(data)
exports["is_ui"]:cancelProgressBar()
data: table
title: string
icon: string or nil
default: fa-solid fa-user
duration: number or nil
default: 5000
useWhileDead: boolean or nil
default: false
canCancel: boolean or nil
default: false
prop: table or nil
hash: string
bone: number or nil
default: 60309
position: table
x: number
y: number
z: number
rotation: table
x: number
y: number
z: number
animation: table or nil
dict: string
anim: string
blendIn: number or nil
default: 3.0
blendOut: number or nil
default: 3.0
duration: number or nil
default: -1
flag: number or nil
default: 49
playbackRate: number or nil
default: 0
lockX: boolean or nil
default: false
lockY: boolean or nil
default: false
lockZ: boolean or nil
default: false
scenario: table or nil
name: string
enterAnim: boolean or nil
default: true
disable: table or nil
move: boolean or nil
default: false
car: boolean or nil
default: false
combat: boolean or nil
default: false
mouse: boolean or nil
default: false
sprint: boolean or nil
default: false
Example Usage
-- Example 1: Simple operationlocal status = exports["is_ui"]:ProgressBar({ title ="Test", icon ="fa-solid fa-user", duration =5000, useWhileDead =false, canCancel =false, animation = { dict ="amb@prop_human_movie_bulb@base", anim ="base", },})if status ==truethenprint("done")elseif status ==falsethenprint("cancel")end-- Example 2: Advanced operationlocal status = exports["is_ui"]:ProgressBar({ title ="Test", icon ="fa-solid fa-user", duration =5000, useWhileDead =false, canCancel =false, prop = { hash ="bkr_prop_weed_lrg_01b", bone =60309, position = {x =0.0, y =0.0, z =0.0}, rotation = {x =0.0, y =0.0, z =0.0} }, animation = { dict ="amb@prop_human_movie_bulb@base", anim ="base", blendIn =3.0, blendOut =3.0, duration =-1, flag =0, playbackRate =0, lockX =false, lockY =false, lockZ =false },-- scenario = {-- name = "WORLD_HUMAN_PAPARAZZI",-- enterAnim = true-- }, disable = { move =true, car =true, combat =true, mouse =true, sprint =true },})if status ==truethenprint("function done")elseif status ==falsethenprint("function cancel")end
Default Framework Progress Bar
To quickly change default Progress Bar, go to the given file and replace the functions to call our export.
QBCore
qb-core -> client -> functions.lua
function QBCore.Functions.Progressbar(name, label, duration, useWhileDead, canCancel, disableControls, animation, prop, propTwo, onFinish, onCancel, icon)
if prop and prop.model and (prop.coords and prop.coords.x and prop.coords.y and prop.coords.z) and (prop.rotation and prop.rotation.x and prop.rotation.y and prop.rotation.z) then
prop = { hash = prop.model, bone = prop.bone ornil, position = prop.coords, rotation = prop.rotation }else prop =nilendif animation and animation.task thenlocal scenario = { name = animation.task, enterAnim =true } animation =nilelseif animation and animation.animDict and animation.anim then animation = { dict = animation.animDict, anim = animation.anim, blendIn = animation.blendIn, blendOut = animation.blendOut, duration = animation.duration, flag = animation.flags, playbackRate = animation.playbackRate, lockX = animation.lockX, lockY = animation.lockY, lockZ = animation.lockZ }endiftype(disableControls) =="table" thenlocal disable = { move = disableControls.disableMovement, car = disableControls.disableCarMovement, combat = disableControls.disableCombat, mouse = disableControls.disableMouse, sprint = disableControls.disableSprint }endlocal status = exports["is_ui"]:ProgressBar({ title = label, icon = icon, duration = duration, useWhileDead = useWhileDead, canCancel = canCancel, prop = prop, animation = animation, scenario = scenario, disable = disable })if status ==truethenif onFinish thenonFinish()endelseif status ==falsethenif onCancel thenonCancel()endendend
ESX
es_extended -> client -> functions.lua
functionESX.Progressbar(title,duration,Options) if Options.prop and Options.prop.hash and (Options.prop.position and Options.prop.position.x and Options.prop.position.y and Options.prop.position.z) and (Options.prop.rotation and Options.prop.rotation.x and Options.prop.rotation.y and Options.prop.rotation.z) then
local prop = Options.propendif Options.animation and Options.animation.type =="Scenario" thenlocal scenario = { name = Options.animation.Scenario, enterAnim = Options.animation.enterAnim }elseif Options.animation and Options.animation.type =="anim" thenlocal animation = { dict = Options.animation.dict, anim = Options.animation.lib, blendIn = Options.animation.blendIn, blendOut = Options.animation.blendOut, duration = Options.animation.duration, flag = Options.animation.flag, playbackRate = Options.animation.playbackRate, lockX = Options.animation.lockX, lockY = Options.animation.lockY, lockZ = Options.animation.lockZ }endif Options.disable andtype(Options.disable) =="table" thenlocal disable = Options.disableendlocal status = exports["is_ui"]:ProgressBar({ title = title, icon = Options.icon, duration = duration, useWhileDead = Options.useWhileDead, canCancel = Options.canCancel, prop = prop, animation = animation, scenario = scenario, disable = disable })if status ==truethenif Options.onFinish then Options.onFinish()endelseif status ==falsethenif Options.onCancel then Options.onCancel()endendend