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