mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
feat(resource/interface): progressActive and cancelprogress command
This commit is contained in:
@@ -142,7 +142,15 @@ function lib.cancelProgress()
|
||||
progress = false
|
||||
end
|
||||
|
||||
function lib.progressActive()
|
||||
return progress and true
|
||||
end
|
||||
|
||||
RegisterNUICallback('progressComplete', function(data, cb)
|
||||
cb(1)
|
||||
progress = nil
|
||||
end)
|
||||
|
||||
RegisterCommand('cancelprogress', function()
|
||||
if progress?.canCancel then progress = false end
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user