From 0009616b7819727dfd9158dca997a0bbd631a725 Mon Sep 17 00:00:00 2001 From: shanruto Date: Sat, 18 Nov 2023 03:42:45 +0100 Subject: [PATCH] refactor: more descriptive config name Fixed the typos in the config and client main for removal of lockpick --- client/main.lua | 4 ++-- config.lua | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/main.lua b/client/main.lua index f7acbd1..80f5f98 100644 --- a/client/main.lua +++ b/client/main.lua @@ -409,11 +409,11 @@ function LockpickFinishCallback(success) end if usingAdvanced then - if chance <= Config.removeLockpickAdvanced[GetVehicleClass(vehicle)] then + if chance <= Config.removeAdvancedLockpickChance[GetVehicleClass(vehicle)] then TriggerServerEvent("qb-vehiclekeys:server:breakLockpick", "advancedlockpick") end else - if chance <= Config.removeLockpickNormal[GetVehicleClass(vehicle)] then + if chance <= Config.removeNormalLockpickChance[GetVehicleClass(vehicle)] then TriggerServerEvent("qb-vehiclekeys:server:breakLockpick", "lockpick") end end diff --git a/config.lua b/config.lua index 0f99720..e20edbd 100644 --- a/config.lua +++ b/config.lua @@ -33,7 +33,7 @@ Config = { [21] = 0.5, -- Trains [22] = 0.5, -- Open Wheel }, - removeLockpickAdvanced = { -- Chance to remove advanced lockpick on fail by vehicle class + removeAdvancedLockpickChance = { -- Chance to remove advanced lockpick on fail by vehicle class [0] = 0.5, -- Compacts [1] = 0.5, -- Sedans [2] = 0.5, -- SUVs