Hi when i press pay to retrieve vehicle nothing happens and no errors
would not have put to the vehicle when it is imprisoned in the impound, be deleted from the garage …
type this example I saw in another script.
-- Insert vehicle into impound table
MySQL.Async.execute("INSERT INTO `impounded_vehicles` (`vehicle`, `owner`, `impounded_at`) VALUES(@vehicle, @owner, @timestamp)", {['@vehicle'] = vehicle.vehicle, ['@owner'] = vehicle.owner, ['@timestamp'] = current_time})
-- Delete vehicle from garage
MySQL.Async.execute("DELETE FROM owned_vehicles WHERE plate=@plate LIMIT 1", {['@plate'] = vehicle.plate})
-- Insert vehicle into owned_vehicles table
MySQL.Async.execute("INSERT INTO `owned_vehicles` (`vehicle`, `state`, `owner`) VALUES(@vehicle, '0', @owner)", {['@vehicle'] = vehicle.vehicle, ['@owner'] = vehicle.owner})
-- Delete vehicle from Impound Lot
MySQL.Async.execute("DELETE FROM impounded_vehicles WHERE id=@id LIMIT 1", {['@id'] = vehicle.id})
I’ll look into it once i’ve got the time. Thanks for your feedback.
Is there anyone that can explain step by step how to install this with esx_migrate?
When I got to impound a vehicle it says unknown owner after i just bought it from the dealership.
install the new vehicle shop, which is already updated with a new
do you have a link to it?
If this top vehicheshop has bugged you in the hall of the car shop. This vehicle shop is not bugged in the middle of the car show…
esx_vehicleshop.rar (99.1 KB)
You received this error when opening AND attempting to attach vehicle
Can someone help me please?
Hi,
it’s pretty self-explanatory. It seems that the column “plate” is missing in your table. “owned_vehicles”
When I open, I can not close the window.
What could be wrong?
Don’t change the name of the resource folder. Leave the folder as named as hrp_pd_impound.
Thank you for your help
This time that I inform in the form
Days & weeks
Matches information inside the game or outside
so that player can get the release of the vehicle seized?
Is there any way for the police or mechanic to release the vehicle or only by the system?
@HorizonPls Great work man, This is amazing, Im still trying to figure out how to only allow Minutes and a max amount of minutes so people don’t abuse and impound cars for days on end and 24h IRL having to wait would be a pain
Ima work on it this weekend mate, im back home today. Ill update the thread once its done
Great man Love to hear that If you can @ me That would be great. when you update the thread
UPDATE
The config file should now work, so you can set the max days etc. Let me know if you would like to control other variables. This would be update 2
Merged both update 1 and 2 into master.
@KrizFrost - tag
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.
After the last update when having apprehend vehicle I get this error in the console.
I saw that the sql had no change in GitHub
I add cod in the esx_eden_garage script
MySQL.Async.fetchAll(“SELECT * FROM owned_vehicles WHERE owner=@identifier AND state=false AND owned_vehicles.plate NOT IN (SELECT plate from h_impounded_vehicles)”,{[’@identifier’] = xPlayer.getIdentifier()}, function(data)