mirror of
https://github.com/jimathy/jim-consumables.git
synced 2026-08-16 22:16:02 +01:00
Fixes related to progressbars
This commit is contained in:
@@ -172,7 +172,7 @@ RegisterNetEvent(getScript()..':Consume', function(itemName)
|
|||||||
debugPrint("^5Debug^7: ^3Consume^7: ^2Event already started^7, ^1Cancelling^7.")
|
debugPrint("^5Debug^7: ^3Consume^7: ^2Event already started^7, ^1Cancelling^7.")
|
||||||
tempLockInv(false)
|
tempLockInv(false)
|
||||||
if Config.UseProgbar then
|
if Config.UseProgbar then
|
||||||
stopPropgressBar()
|
stopProgressBar()
|
||||||
else
|
else
|
||||||
triggerNotify(nil, "Stopped "..string, "error")
|
triggerNotify(nil, "Stopped "..string, "error")
|
||||||
end
|
end
|
||||||
@@ -208,9 +208,17 @@ RegisterNetEvent(getScript()..':Consume', function(itemName)
|
|||||||
debugPrint("^5Debug^7: ^3Consume^7: ^2Player Movement Flag^7 - ^6"..json.encode(MovementType).." ^7")
|
debugPrint("^5Debug^7: ^3Consume^7: ^2Player Movement Flag^7 - ^6"..json.encode(MovementType).." ^7")
|
||||||
if Config.Main.UseProgbar then
|
if Config.Main.UseProgbar then
|
||||||
CreateThread(function()
|
CreateThread(function()
|
||||||
if progressBar({ time = time, label = string..Items[itemName].label.."..", dead = false, cancel = false}) then
|
if progressBar({
|
||||||
|
time = time,
|
||||||
|
label = string..Items[itemName].label.."..",
|
||||||
|
dead = false,
|
||||||
|
disableMovement = false,
|
||||||
|
disableCombat = true,
|
||||||
|
cancel = false
|
||||||
|
}) then
|
||||||
consuming = false
|
consuming = false
|
||||||
else
|
else
|
||||||
|
consuming = false
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
else
|
else
|
||||||
@@ -273,7 +281,7 @@ RegisterNetEvent(getScript()..':Consume', function(itemName)
|
|||||||
tempLockInv(false)
|
tempLockInv(false)
|
||||||
hideText()
|
hideText()
|
||||||
if Config.Main.UseProgbar then
|
if Config.Main.UseProgbar then
|
||||||
stopPropgressBar()
|
stopProgressBar()
|
||||||
else
|
else
|
||||||
triggerNotify(nil, "Cancelled "..string, "error")
|
triggerNotify(nil, "Cancelled "..string, "error")
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ Config = {
|
|||||||
|
|
||||||
},
|
},
|
||||||
Main = {
|
Main = {
|
||||||
UseProgbar = false, -- Disabled this, progress bars stop all anims when complete.
|
UseProgbar = false, -- Recommended to disable this, progress bars stop ALL anims when complete.
|
||||||
-- This is intended to create a progressbar to show consuming but it was usually forces animations to end weirdly
|
-- This is intended to create a progressbar to show consuming but it was usually forces animations to end weirdly
|
||||||
},
|
},
|
||||||
Crafting = {
|
Crafting = {
|
||||||
|
|||||||
Reference in New Issue
Block a user