You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The addon cars in Config.SharedKeys are locked. Only the vanilla cars are working fine.
To Reproduce
Steps to reproduce the behavior:
Add addon cars to Config.SharedKeys
Expected behavior
To be able to unlock the car models that are in Config.SharedKeys.
Questions (please complete the following information):
When you last updated: now,
Are you using custom resource? which ones? In general quite a few, but none that should impact this feature. Especially considering that vanilla cars can be unlocked.
Have you renamed qb- to something custom? No
The text was updated successfully, but these errors were encountered:
Alrighty, so the issue is in client->main.lua. You need to convert the name to the hash:
function AreKeysJobShared(veh)
local vehModelHash = GetEntityModel(veh) -- Get the model hash
local vehPlate = QBCore.Functions.GetPlate(veh)
local jobName = QBCore.Functions.GetPlayerData().job.name
local onDuty = QBCore.Functions.GetPlayerData().job.onduty
for job, v in pairs(Config.SharedKeys) do
if job == jobName then
if Config.SharedKeys[job].requireOnduty and not onDuty then
return false -- Require on-duty but player isn't
end
for _, vehicle in pairs(v.vehicles) do
local vehicleHash = GetHashKey(vehicle) -- Convert config vehicle name to hash
if vehicleHash == vehModelHash then
if not HasKeys(vehPlate) then
TriggerServerEvent('qb-vehiclekeys:server:AcquireVehicleKeys', vehPlate)
end
return true
end
end
end
end
return false
end
The addon cars in Config.SharedKeys are locked. Only the vanilla cars are working fine.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
To be able to unlock the car models that are in Config.SharedKeys.
Questions (please complete the following information):
qb-
to something custom? NoThe text was updated successfully, but these errors were encountered: