[Release] PD Impound [ESX]

Hey guys,

Just wanted to share a little script I wrote that allows you to impound vehicles for a certain length of time and require the user to pay a fee for them on release. Currently there’s no config file, you’ll have to edit everything in the script itself.

Github Link: https://github.com/Horizahn/hrp_pd_impound

  • I’m not sure if I will expand it in the future, if you do find any bugs though please let me know.
  • This script does not stop players from spawning vehicles elsewhere, you’ll probably want to disable the spawning of vehicles in another script if the user’s plate is found in the impounded table.
    EXPLANATION -> [Release] PD Impound [ESX]
  • You’re allowed to impound if you either have the police job, or the mecano job.
  • There currently are no markers. The default impound location is Popular Street PD. At the front entrance you can unimpound, and in the parking lot garage next to it ( the one you can drive into ) you can impound vehicles.
  • Impounded vehicles are bound to steam Id’s.



Dependencies:

Warning:

  • This script has not been tested on any public servers, if you use it you do so at your own risk. If you’d like to test this script, please share the results.
  • I will not be responsible for any damage this script could cause.

Known limitations:

  • When a player switches jobs they have to relog in order to be able to use these functionalities. This is because playerdata is only loaded at the start. This is the way it is for now.
  • If a user registred during this session the functionalities also seem to run into some problems, probably because of the same reason as the previous point.

Any suggestions, help / tips or bug reports are welcome.

  • Horizon
28 Likes

Updates:

01/09/2018 - Duration now displays placeholder text, “weeks” and “days”
01/09/2018 - Add ESX_Migrate to dependencies.
05/09/2018 - Update_01: Police and mechanics can now disable the unlock functionality in order to have suspects speak to them before being allowed to unlock their vehicle.
22/09/2018 - You can now change a couple of basic rules in the config such as max date / impound fee etc.
22/09/2018 - Explained how to prevent other scripts from spawning the vehicles: [Release] PD Impound [ESX]
22/09/2018 - You can now impound a vehicle for hours instead of only weeks or days.
23/09/2018 - Fixed a little bug where the unlock buttons would be disabled under all circumstances in the Admin Terminal
29/09/2018 - Fixed a bug where the releasedate was incorrect for certain timezones.
29/09/2018 - Damaged vehicles no longer spawn undamaged when unimpounding.

I moved it to #development:releases for you and added [ESX] into the title.

3 Likes

I just make this work good on my server and 100% nice job

I have a decent populated ESX Server I will test this out and inform you on what we find dude Great release

This is great just issue I have is its using IRL time which can kinda be annoying for those who want to abuse this feature then someones screwed and they can not get their vehicle out.

You seem to have a plate column on your owned_vehicles? I seem to only have vehicle where plate is defined in.

Oi -

I linked this to you like - when it released.

Or was that Dave…

Can’t remember.

1 Like

Thanks babe! idk you know how much shit gets sent to me.

You know I know lol
Kinda makes the plate changer obsolete, though D:

1 Like

What garage system are you currently using cause I absolutely love this but it will conflict with the eden_garage impounds. Meaning they can just run back to impound and get it and skip waiting for the police impound time to expire.

Attempted to impound my own vehicle, Filled everything out, Pressed Impound and it froze. Couldn’t move, couldn’t cancel or anything. Couldn’t move, had to Ctrl + Alt + Del to get out.

Is it possible to do this for police? For example when they are in Jail and they get released they could sign a release form, sort of thing. Just a idea…2

That too. Or maybe integrate it into esx_policejob’s police menu. It has an “Impound” option, but it just deletes it.

4 Likes

Yeah we also use the eden garage since for the normal garage some cars are most lost. But i would love the normal garage too. But dont know how a player could get a lost car back.

hmm?..

Should only give this message when the vehicle is not owned by a player. Impounding civilian vehicles would not make any sense.

Would this be the issue? If not, did you test this in the same session as registring the character?

If thats also not the case i’ll have to take a look later.

1 Like

I don’t see a really good way of doing it other than using a real life date, I could however add an hours option if that helps out.

If the system is abused, you’ll have to change the releasedates in the database for now. I’ve been thinking about making a panel for the police and mechanics giving them the ability to unimpound at any time.

Also, when I have the time, i’ll try creating a configuration file where you could set the max duration yourself.

1 Like

Thats rather odd, any errors on the client or server? I’ve never had this issue before.

Not that I’ve seen. I’ll try to provide more info later today. Still a great release. definitely a need

3 Likes