qbcore-framework / qb-policejob

Police Job & Evidence System For QB-Core :police_officer: :policewoman:
GNU General Public License v3.0
71 stars 378 forks source link

[BUG] Retrieving a vehicle from impound spawns a random vehicle of that model #505

Closed aldude999 closed 4 months ago

aldude999 commented 6 months ago

Describe the bug After using /impound, the vehicle shows up in the impound lot, but when I try to remove it, a new vehicle of that model spawns, not owned by anyone, and when checking the impound lot again, the vehicle is still there.

No error logs are displayed anywhere.

To Reproduce Steps to reproduce the behavior:

  1. Use /admin to spawn, and buy a vehicle
  2. Use /impound as police to send to impound lot
  3. Go to impound lot and remove vehicle from there

Expected behavior Impound lot either states I cannot remove the vehicle, or the proper vehicle is removed from the impound lot

Screenshots Youtube Video of Bug

aldude999 commented 6 months ago

Looking into it, it appears the issue stems from this function no longer being available in qb-garages server code: https://github.com/qbcore-framework/qb-garages/blob/4a5328762e6da051e80e6d2207780d62558907e3/server/main.lua#L143

When client job.lua calls out that function, nothing happens after it: https://github.com/qbcore-framework/qb-policejob/blob/main/client/job.lua#L120

Readding the callback stub in the garages code fixes the issue for me.

Pewwww53 commented 6 months ago

did you put that car in the garage first before you impound it?

aldude999 commented 6 months ago

did you put that car in the garage first before you impound it?

This was a car that was on the street, I walked up to it and used /impound to get it into this state. It had been garaged previously and taken out before using impound.

GhzGarage commented 4 months ago

https://github.com/qbcore-framework/qb-policejob/commit/5bea1d4bb2a3d73b61bd67d96c92296730849333