Skip to content
This repository has been archived by the owner on Nov 30, 2024. It is now read-only.

destroyed cars do not get sent to impound. #139

Open
zZzScripts opened this issue Oct 1, 2023 · 8 comments
Open

destroyed cars do not get sent to impound. #139

zZzScripts opened this issue Oct 1, 2023 · 8 comments

Comments

@zZzScripts
Copy link

When a player's car is destroyed or exploded. I have to manually send it to the impoundlot via the database.

@real-general-iroh
Copy link

Not a bug; garages are not intended to do this. You have to write a script to handle that yourself.

@zZzScripts
Copy link
Author

zZzScripts commented Jan 19, 2024

Not a bug; garages are not intended to do this. You have to write a script to handle that yourself.

100% a bug. Switched to normal qb-garages and the vehicles go to the impound without me wasting my time manually sending them there via the database.

@JonasDev17
Copy link
Owner

Not a bug; garages are not intended to do this. You have to write a script to handle that yourself.

100% a bug. Switched to normal qb-garages and the vehicles go to the impound without me wasting my time manually sending them there via the database.

No, It's not a bug, that's the way the code was written. Cause qb-garages just checks all the vehicles currently loaded client-side and if its not there then you're allowed to spawn it but this would allow players to dupe vehicles if the vehicle is far away and unloaded by the game. You have to introduce a game mechanic to delete destroyed vehicles.

@ChrizsTTV
Copy link

Has anyone a small snippet on how I could add this mechanic? Some Cars just despawn and I don't wanna restart the script or put the state inside the sql

@real-general-iroh
Copy link

Has anyone a small snippet on how I could add this mechanic? Some Cars just despawn and I don't wanna restart the script or put the state inside the sql

The solution I used was to add a little third eye option to all vehicles that only shows if the vehicle health is below a certain amount and it allows the player to delete the vehicle and get it from the impound. This is less client heavy, as you are not constantly checking the game pool. Hell, this implementation is easy enough to ask ChatGPT or Gemini to write it if you lack the knowledge. It can also explain the functions far better than I ever could.

@JonasDev17
Copy link
Owner

Has anyone a small snippet on how I could add this mechanic? Some Cars just despawn and I don't wanna restart the script or put the state inside the sql

main...JonasDev17-patch-7

Try this, I haven't tested it though...

@ChrizsTTV
Copy link

I will try it now that u pushed it to main, thank you. What Can I do about Cars that despawn?

@madmechanic187
Copy link

madmechanic187 commented Mar 20, 2024

so what do we do with out the impound we need some sort of fix

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants