mirror of
https://github.com/jimathy/jim-consumables.git
synced 2026-08-17 06:26:03 +01:00
more buff time fixes
This commit is contained in:
@@ -167,19 +167,19 @@ RegisterNetEvent('jim-consumables:Consume', function(itemName)
|
||||
end
|
||||
if stats.effect == "heal" then
|
||||
if GetResourceState("ps-buffs") == "started" then exports["ps-buffs"]:AddHealthBuff((stats.time or 10000), (stats.amount or 6))
|
||||
else CreateThread(function() HealEffect({(stats.effect.time or 10000), (stats.amount or 6)}) end) end
|
||||
else CreateThread(function() HealEffect({(stats.time or 10000), (stats.amount or 6)}) end) end
|
||||
end
|
||||
if stats.effect == "stamina" then
|
||||
if GetResourceState("ps-buffs") == "started" then exports["ps-buffs"]:StaminaBuffEffect((stats.time or 10000), (stats.amount or 6))
|
||||
else CreateThread(function() StaminaEffect({(stats.effect.time or 10000), (stats.amount or 6)}) end) end
|
||||
else CreateThread(function() StaminaEffect({(stats.time or 10000), (stats.amount or 6)}) end) end
|
||||
end
|
||||
if GetResourceState("ps-buffs") == "started" then --PS-BUFFS ONLY
|
||||
if Config.Debug then print("^5Debug^7: ^3Consume^7: ^4PS^7-^4Buffs ^2found^7, ^2hooking in to get buffs") end
|
||||
if stats.effect == "armor" then exports["ps-buffs"]:AddArmorBuff((stats.effect.time or 10000), (stats.amount or 6)) end
|
||||
if stats.effect == "armor" then exports["ps-buffs"]:AddArmorBuff((stats.time or 10000), (stats.amount or 6)) end
|
||||
if stats.effect == "stress" then exports["ps-buffs"]:AddStressBuff((stats.time or 10000), (stats.amount or 6)) end
|
||||
if stats.effect == "swimming" then exports["ps-buffs"]:SwimmingBuffEffect((stats.effect.time or 10000), (stats.amount or 6)) end
|
||||
if stats.effect == "hacking" then exports["ps-buffs"]:AddBuff("hacking", (stats.effect.time or 10000)) end
|
||||
if stats.effect == "intelligence" then exports["ps-buffs"]:AddBuff("intelligence", (stats.effect.time or 10000)) end
|
||||
if stats.effect == "swimming" then exports["ps-buffs"]:SwimmingBuffEffect((stats.time or 10000), (stats.amount or 6)) end
|
||||
if stats.effect == "hacking" then exports["ps-buffs"]:AddBuff("hacking", (stats.time or 10000)) end
|
||||
if stats.effect == "intelligence" then exports["ps-buffs"]:AddBuff("intelligence", (stats.time or 10000)) end
|
||||
if stats.effect == "luck" then exports["ps-buffs"]:AddBuff("luck", (stats.time or 10000)) end
|
||||
if stats.effect == "strength" then exports["ps-buffs"]:AddBuff("strength", (stats.time or 10000)) end
|
||||
end
|
||||
@@ -213,4 +213,4 @@ end)
|
||||
|
||||
AddEventHandler('onResourceStop', function(r) if r ~= GetCurrentResourceName() then return end
|
||||
StopEffects()
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user