Hello everyone,

I’ve been using qb-vehiclekeys on my server, and I ran into an issue where none of the typical fixes were working. After much troubleshooting, I found the solution that worked for me. I wanted to share it here in case anyone else faces the same problem.

Problem:
I was unable to receive vehicle keys using the qb-vehiclekeys script as expected.

Solution:
I modified the Config.GiveKeys function in my configuration to correctly trigger the event that assigns the keys. Here is the correct implementation:

Config.GiveKeys = function(plate)
TriggerEvent(‘vehiclekeys:client:SetOwner’, plate)
end

Explanation:
This function correctly triggers the vehiclekeys:client:SetOwner event, which is necessary to assign the vehicle keys to the player. Make sure that this event is correctly handled in your client scripts to appropriately set the vehicle owner.

I hope this helps anyone who might be experiencing similar issues!

1 Like