mirror of
https://github.com/jimathy/jim-consumables.git
synced 2026-08-18 15:06:03 +01:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e794d9a446 | ||
|
|
541263b156 | ||
|
|
60c42b2506 |
@@ -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
|
||||||
@@ -321,7 +329,7 @@ RegisterNetEvent(getScript()..':Consume', function(itemName)
|
|||||||
hunger = hunger > 100 and 100 or hunger
|
hunger = hunger > 100 and 100 or hunger
|
||||||
|
|
||||||
elseif ESX and ESX.GetPlayerData then
|
elseif ESX and ESX.GetPlayerData then
|
||||||
hunger = (needStats.thirst / 100) * 1000000
|
hunger = (needStats.hunger / 100) * 1000000
|
||||||
hunger = hunger > 1000000 and 1000000 or hunger
|
hunger = hunger > 1000000 and 1000000 or hunger
|
||||||
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 = {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
name "Jim-Consumables"
|
name "Jim-Consumables"
|
||||||
author "Jimathy"
|
author "Jimathy"
|
||||||
version "2.0.04"
|
version "2.0.05"
|
||||||
description "Consumables Script"
|
description "Consumables Script"
|
||||||
fx_version "cerulean"
|
fx_version "cerulean"
|
||||||
game "gta5"
|
game "gta5"
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
2.0.04
|
2.0.05
|
||||||
|
|
||||||
- Fix hunger and thirst events
|
- Fix ESX Hunger events
|
||||||
|
- Fix minor progressBar option issues
|
||||||
|
|
||||||
https://github.com/jimathy/jim-consumables
|
https://github.com/jimathy/jim-consumables
|
||||||
Reference in New Issue
Block a user