[Release] PD Impound [ESX]

roleplay
police
fivem-scripts
release
server

#126

I’m sorry if anything is wrong because I’m new to this. Thanks to HorizonPls for this magical work and for all the help I’ve given these days …


#127

this is exacly what I did
I deleted owned_vehicles and ran this script

CREATE TABLE `owned_vehicles` (
	`owner` VARCHAR(30) NULL DEFAULT NULL COLLATE 'utf8mb4_bin',
	`plate` VARCHAR(12) NOT NULL COLLATE 'utf8mb4_bin',
	`vehicle` LONGTEXT NULL COLLATE 'utf8mb4_bin',

	PRIMARY KEY (`plate`)
);

exacly as said in https://github.com/ESX-Org/esx_migrate but I get alot of sql errors, did I do anything wrong?


#128

how can i open the menu to impound vehicles as an officer?


#129

Is there anyway to add more than one location??


#130

If you hadn’t figured this out yet. None, unless you edit the script itself.


#131

If these errors are coming from my script, showing them would be a good idea. If its just esx_migrate, you might wanna ask around on their thread.


#132

I have tried however I could not apply multiple areas like in police job. Is there something I’m missing? I dont me an to be a pain. I love this script just having issues understanding how to have more than 1 active retrieval area and blip. It worked with impound area and admin console. Any ideas?


#133

I added the resource under the correct foldername: hrp_pd_impound …

when impounding a car i get

Unknown vehicle owner, cannot impound

i checked the topic where someone had this same issue and updated my esx_vehicleshop and same issue

anyone have ideas?


#134

when i print the vehicleandowner it shows this

[ERROR] [MySQL] An critical error happens on MySQL for query “select * from owned_vehicles LEFT JOIN users ON users.identifier = owned_vehicles.owner WHERE plate = rtrim(plate) {@plate=ORE 484 }”: An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException (System.ExceptionResource resource) [0x0000b] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at System.Collections.Generic.Dictionary2[TKey,TValue].Insert (TKey key, TValue value, System.Boolean add) [0x0007c] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0 at System.Collections.Generic.Dictionary2[TKey,TValue].Add (TKey key, TValue value) [0x00000] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at MySQLAsync.FetchAll+d__2.MoveNext () [0x000e9] in <6b79789832b34a31961dbb39358e1b3f>:0
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () [0x00000] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0 at MySQLAsync.Operation1+d__3[TResult].MoveNext () [0x00169] in <6b79789832b34a31961dbb39358e1b3f>:0


#135

solved… needs the latest version of FXServer and the Mysql-ASYNC resource.


#136

Anychance anyone got it working with eden garage so you just can’t spawn the car again?


#137

It doesn’t respond when I click to tow a car or cancel.


#138

I think the only way for this to happen is having a wrong resource name or having it in the wrong folder. It should be in the main resource folder, not esx or anything.


#139

It’s still not fixed. 294th line of client lua is still broken , is it because of that? It says “Citizen.CreateThread(function ()” at 294th line.


#140

I fixed , its able to impound but even if you impound a vehicle , player could spawn that back. I downloaded esx_migrate to improve it but it doesn’t work. Which garage script we should use?


#141

Showhelpnotification is an esx function, what did you do to fix it?

You should be able to use whatever garage you want, the script has its own garage table. You really need to provide more details if you want help.


#142

I just change folder name I make folder name hrp_pd_impound.What details you want I i didn’t understand.For use this script do ı need to delete player vehicle.


#144

If someone is having an issue where the form is stuck open and you cannot close it, try to put “esx_migrate” right below the es_extended" and ‘hrp_pd_impound’ resource on top of the esx_policejob. Since esx_policejob has already built-in impound system it might conflict with this one and it will stuck and won’t have any impact. To make it work, just place it on top of it and it should work. That fixed it for me tho.


#145

Hi,
In server.lua replace :

	MySQL.Async.fetchAll('select * from owned_vehicles LEFT JOIN users ON owned_vehicles.owner = users.identifier WHERE plate = @plate',
		{
			['@plate'] 		= plate,
		}, function(vehicleAndOwner)
		TriggerClientEvent('HRP:ESX:SetVehicleAndOwner', _source, vehicleAndOwner[1]);
	end)

By :

	MySQL.Async.fetchAll('select identifier, firstname, lastname, plate, owner from owned_vehicles LEFT JOIN users ON owned_vehicles.owner = users.identifier WHERE plate = @plate',
		{
			['@plate'] 		= plate,
		}, function(vehicleAndOwner)
		TriggerClientEvent('HRP:ESX:SetVehicleAndOwner', _source, vehicleAndOwner[1]);
	end)

Cordially Hal :slight_smile:


#146

is it possible to contact you on discord?