Skip to content

Commit

Permalink
Update GetVehicleKeys Callback to fix possible issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Cocodrulo authored Nov 14, 2024
1 parent 91db3fb commit a871904
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ end)

QBCore.Functions.CreateCallback('qb-vehiclekeys:server:GetVehicleKeys', function(source, cb)
local Player = QBCore.Functions.GetPlayer(source)
if not Player then return end
if not Player then return cb({}) end
local citizenid = Player.PlayerData.citizenid
local keysList = {}
for plate, citizenids in pairs(VehicleList) do
Expand Down Expand Up @@ -162,4 +162,4 @@ QBCore.Commands.Add('removekeys', Lang:t('addcom.rkeys'), { { name = Lang:t('add
return
end
RemoveKeys(tonumber(args[1]), args[2])
end, 'admin')
end, 'admin')

0 comments on commit a871904

Please sign in to comment.