Skip to content

Commit

Permalink
fix: pass vehicleId to vehiclekeys exports (#585)
Browse files Browse the repository at this point in the history
* fix(bridge/client): pass vehicleId to `hasKeys`

* refactor: pass plate to function

Passes plate to the function as qb-core intended it to but then broke it

* fix(config/server): pass vehicleId to `GiveKeys`

* refactor(config/client): rename `vehicleId` to `vehicle`

Co-authored-by: Manason <clanerp@gmail.com>

---------

Co-authored-by: Solareon <769465+solareon@users.noreply.github.com>
Co-authored-by: Manason <clanerp@gmail.com>
  • Loading branch information
3 people authored Sep 28, 2024
1 parent ca0a54a commit 1964436
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bridge/qb/client/events.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ end)
RegisterNetEvent('QBCore:Client:VehicleInfo', function(info)
local vehicle = NetworkGetEntityFromNetworkId(info.netId)
local plate = qbx.getVehiclePlate(vehicle)
local hasKeys = config.hasKeys()
local hasKeys = config.hasKeys(plate, vehicle)

local data = {
vehicle = vehicle,
Expand Down
4 changes: 2 additions & 2 deletions config/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ return {
},

--- Only used by QB bridge
hasKeys = function()
return exports.qbx_vehiclekeys:HasKeys()
hasKeys = function(plate, vehicle)
return exports.qbx_vehiclekeys:HasKeys(vehicle)
end,
}
2 changes: 1 addition & 1 deletion config/server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ return {
},

giveVehicleKeys = function(src, plate, vehicle)
return exports.qbx_vehiclekeys:GiveKeys(src, plate)
return exports.qbx_vehiclekeys:GiveKeys(src, vehicle)
end,

getSocietyAccount = function(accountName)
Expand Down

0 comments on commit 1964436

Please sign in to comment.