From 931ba1493347fcb82b82be03f4a4a84ff293f0a1 Mon Sep 17 00:00:00 2001 From: Jim Shield Date: Mon, 29 Aug 2022 15:25:21 +0100 Subject: [PATCH] more buff time fixes --- client/client.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/client/client.lua b/client/client.lua index abafa87..e1ef16d 100644 --- a/client/client.lua +++ b/client/client.lua @@ -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) \ No newline at end of file +end)