qbcore-framework / qb-vehiclekeys

Vehicle Keys System For QB-Core :key:
GNU General Public License v3.0
35 stars 224 forks source link

You don't have keys to this vehicle #228

Closed PCL-CrisKolkman closed 9 months ago

PCL-CrisKolkman commented 1 year ago

Describe the bug So this addon seems to be working fine, exept when used in combination with ik-jobgarage?

To Reproduce Steps to reproduce the behavior:

  1. Open the police job garage (car has been added and is also in shared)
  2. Take the custom police car
  3. Try to lock/unlock the car
  4. See error image

Expected behavior When the car is being spawned by using the command /car carname everything is fine, but when you "buy" the car from the police garage, you don't get the keys

Screenshots Below is when spawned using /car carname

image

Questions (please complete the following information):

Additional context

AnishBplayz commented 11 months ago

You gotta set that in your script from which you buy the police car

PCL-CrisKolkman commented 11 months ago

You gotta set that in your script from which you buy the police car

And exactly "what" should I set in the script (qb-policejob)?

AnishBplayz commented 11 months ago

You gotta trigger the givekeys event when you spawn the car

PCL-CrisKolkman commented 11 months ago

You gotta trigger the givekeys event when you spawn the car

But where (and how) to trigger this? The custom car is spawned from the police garage. Spawning the car with the command /car custom_car gives me the keys to the vehicle but not when spawned from police garage.

github-actions[bot] commented 9 months ago

This issue has had 60 days of inactivity & will close within 7 days