From 3db832748b0cc6f3cbce4c4d9b5e27c0d70da7f6 Mon Sep 17 00:00:00 2001 From: Manason Date: Mon, 9 Sep 2024 23:49:28 -0700 Subject: [PATCH] feat: disable key search if chance is 0.0 --- client/main.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/main.lua b/client/main.lua index 4d4a292..d92b937 100644 --- a/client/main.lua +++ b/client/main.lua @@ -93,6 +93,10 @@ local isSearchLocked = false local isSearchAllowed = false local function setSearchLabelState(isAllowed) if isSearchLocked and isAllowed then return end + if isAllowed and cache.vehicle and sharedFunctions.getVehicleConfig(cache.vehicle).findKeysChance == 0.0 then + isSearchAllowed = false + return + end local isOpen, text = lib.isTextUIOpen() local newText = locale('info.search_keys_dispatch') local isValidMessage = text and text == newText