[Release] PD Impound [ESX]

Alright, so for the people that havent figured this out yet. If you do not want players to be able to get their vehicles from different locations when they’re impounded you’re going to have to edit some scripts.

These scripts should be server side and include the queries to be executed on the database. What you want to do is add a where clause that executes a subquery that checks if the vehicle plate is present in the h_impounded_vehicles table. Example below is from the ESX_Eden_Garage 'eden_garage:getOutVehicles' server event.

'SELECT * FROM owned_vehicles WHERE owner=@identifier AND state=false AND owned_vehicles.plate NOT IN (SELECT plate from h_impounded_vehicles);'

The important part here is:

owned_vehicles.plate NOT IN (SELECT plate from h_impounded_vehicles);

At this moment I’ve not implemented anything that deletes the vehicle from the owned vehicles table as that could carry the risk of people their vehicles being lost completely. Not something I want to be responsible for.

In the future I might add a seperate branch that has this functionality if many of you are in need of it.

1 Like