Skip to content

Commit

Permalink
fix(client/main): default auto lock to false if job not in config (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
Manason authored Jul 29, 2024
1 parent 9a64477 commit 7c1299c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 7c1299c

Please sign in to comment.