[HELP] Impound Issue - esx_policejob / esx_jb_eden_garage

Hello everyone,
My friend and i making a Rp server but we got some trouble with esx_policejob and the impound function.

At this moment, when a cop try to impound a NPC car or his own car that work.
BUT every time he try to impound a registered player car, that won’t work. The notification show that the impound is sucessfull and no error in the terminal. But the car don’t disapear.

We have tried many differents solutions, but none worked…
I’m here to seek any tips or any idear to manage to find a solution.

Thanks by advance.

Ps : we are using esx_policejob, es_extended and esx_jb_eden_garage2 latest versions

Can you show us your modifications on code?

Hi @JustCarry ,
actually we are back to the basic and nothing work. I’ll show you the function of the script that didn’t work for us if you want

function ImpoundVehicle(vehicle)
–local vehicleName = GetLabelText(GetDisplayNameFromVehicleModel(GetEntityModel(vehicle)))
ESX.Game.DeleteVehicle(vehicle)
ESX.ShowNotification(_U(‘impound_successful’))
currentTask.busy = false
end

We tried to replace this : "ESX.Game.DeleteVehicle(vehicle)" by this "DeleteEntity(vehicle)"

And also tried replace it by this : "SetEntityAsMissionEntity(vehicle, true, true) DeleteVehicle(vehicle)"

It keep doing the same things (NPC car and your own car despawn when impound but Player Car don’t)

Thx by advance

1 Like

Did you check that vehicle is exist? Try out to print it.

We put this code in the function :

if DoesEntityExist(vehicle) then
        Citizen.Trace('exist')
    end

And yes in the terminal “exist” appear so yeah… the scrip find the vehicle

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.