From 5bf410321aa38f58a0c296d72fe2a9a2250f488d Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 9 Nov 2023 22:14:40 -0800 Subject: [PATCH] feat: can now refill tank at any oxygen level, but cannot fill underwater --- client/main.lua | 4 ++-- locales/en.lua | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/main.lua b/client/main.lua index 052a815..a9a0b97 100644 --- a/client/main.lua +++ b/client/main.lua @@ -17,8 +17,8 @@ local function disableScuba() end lib.callback.register('qbx_divegear:client:fillTank', function() - if oxygenLevel ~= 0 then - exports.qbx_core:Notify(Lang:t("error.oxygenlevel", {oxygenlevel = oxygenLevel}), 'error') + if IsPedSwimmingUnderWater(cache.ped) then + exports.qbx_core:Notify(Lang:t("error.underwater", {oxygenlevel = oxygenLevel}), 'error') return false end diff --git a/locales/en.lua b/locales/en.lua index 82dab04..383d0ba 100644 --- a/locales/en.lua +++ b/locales/en.lua @@ -3,7 +3,7 @@ local Translations = { canceled = "Canceled", not_standing_up = "You need to be on solid ground to put this on...", need_otube = "you need to refill your oxygen! Get a replacement air supply!", - oxygenlevel = "Your air level is %{oxygenlevel}, it must be at 0 to refill!", + underwater = "Cannot do this underwater", }, success = { took_out = "You took your diving gear off.",