Skip to content

Commit

Permalink
Merge pull request #503 from Qwerty1Verified/patch-1
Browse files Browse the repository at this point in the history
🐛 Fix: Impound not giving keys or setting props
  • Loading branch information
GhzGarage authored Mar 18, 2024
2 parents 63026f9 + b73977c commit 5bea1d4
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions client/job.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5bea1d4

Please sign in to comment.