From b73977c628459cecbf02e7a3cda3d93df229cacb Mon Sep 17 00:00:00 2001 From: Joel <34402846+Qwerty1Verified@users.noreply.github.com> Date: Fri, 15 Mar 2024 22:37:38 +0000 Subject: [PATCH] Fix: Impound not giving keys or setting props --- client/job.lua | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/client/job.lua b/client/job.lua index de5abc38..d6e09482 100644 --- a/client/job.lua +++ b/client/job.lua @@ -117,20 +117,17 @@ function TakeOutImpound(vehicle) if coords then QBCore.Functions.TriggerCallback('QBCore:Server:SpawnVehicle', function(netId) local veh = NetToVeh(netId) - QBCore.Functions.TriggerCallback('qb-garage:server:GetVehicleProperties', function(properties) - QBCore.Functions.SetVehicleProperties(veh, properties) - SetVehicleNumberPlateText(veh, vehicle.plate) - SetVehicleDirtLevel(veh, 0.0) - SetEntityHeading(veh, coords.w) - exports[Config.FuelResource]:SetFuel(veh, vehicle.fuel) - doCarDamage(veh, vehicle) - TriggerServerEvent('police:server:TakeOutImpound', vehicle.plate, currentGarage) - closeMenuFull() - TaskWarpPedIntoVehicle(PlayerPedId(), veh, -1) - TriggerEvent('vehiclekeys:client:SetOwner', QBCore.Functions.GetPlate(veh)) - SetVehicleEngineOn(veh, true, true, true) - end, vehicle.plate) - + QBCore.Functions.SetVehicleProperties(veh, json.decode(vehicle.mods)) + SetVehicleNumberPlateText(veh, vehicle.plate) + SetVehicleDirtLevel(veh, 0.0) + SetEntityHeading(veh, coords.w) + exports[Config.FuelResource]:SetFuel(veh, vehicle.fuel) + doCarDamage(veh, vehicle) + TriggerServerEvent('police:server:TakeOutImpound', vehicle.plate, currentGarage) + closeMenuFull() + TaskWarpPedIntoVehicle(PlayerPedId(), veh, -1) + TriggerEvent('vehiclekeys:client:SetOwner', QBCore.Functions.GetPlate(veh)) + SetVehicleEngineOn(veh, true, true, true) end, vehicle.vehicle, coords, true) end end