From 7c1299c6da850b73da61026f00f9173ebc4c7089 Mon Sep 17 00:00:00 2001 From: Manason Date: Sun, 28 Jul 2024 23:48:25 -0700 Subject: [PATCH] fix(client/main): default auto lock to false if job not in config (#93) --- client/main.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/main.lua b/client/main.lua index 813c020..74ef49b 100644 --- a/client/main.lua +++ b/client/main.lua @@ -377,14 +377,14 @@ for _, info in pairs(config.sharedKeys) do local leftVehicle = cache.vehicle if not vehicle and leftVehicle then local isShared = areKeysJobShared(leftVehicle) - local isAutolockEnabled = config.sharedKeys[QBX.PlayerData.job.name].enableAutolock + local isAutolockEnabled = config.sharedKeys[QBX.PlayerData.job.name]?.enableAutolock if isShared and isAutolockEnabled then TriggerServerEvent('qb-vehiclekeys:server:setVehLockState', NetworkGetNetworkIdFromEntity(leftVehicle), 2) end end end) - break; + break end end