Feat: ESX.CancelProgressbar

This commit is contained in:
JustGod
2024-10-25 23:36:40 +02:00
parent 5f660bcfac
commit e0ce2c6b27
2 changed files with 11 additions and 2 deletions
+10 -2
View File
@@ -68,8 +68,16 @@ function ESX.SetPlayerData(key, val)
end
end
function ESX.Progressbar(...)
return IsResourceFound('esx_progressbar') and exports['esx_progressbar']:Progressbar(...)
---@param message string
---@param length? number Timeout in milliseconds
---@param options? ProgressBarOptions
---@return boolean Success Whether the progress bar was successfully created or not
function ESX.Progressbar(message, length, options)
return IsResourceFound('esx_progressbar') and exports['esx_progressbar']:Progressbar(message, length, options)
end
function ESX.CancelProgressbar()
return IsResourceFound('esx_progressbar') and exports['esx_progressbar']:CancelProgressbar()
end
function ESX.ShowNotification(message, notifyType, length)
+1
View File
@@ -31,6 +31,7 @@ end
---@param message string
---@param length? number Timeout in milliseconds
---@param Options? ProgressBarOptions
---@return boolean Success
local function Progressbar(message, length, Options)
if CurrentProgress then
return false