[Release] Vehicle Clean Up (UPDATED v2)

Yeah it’s a somewhat weird behaviour. Sometimes it cleans up all the cars, sometimes only the ones spawned by natives and sometimes not at all. That’s still a better solution than the old version of my script though.

It would be nice if there could be a feature to do /delv or /delveh like how it is on HSG so I can remove them manually as well.

2 Likes

Why are you doing this in a loop? it’s only required to set it once per vehicle, preferably after just spawning it.

Yeah, but there’s no other way to check if the player is in a vehicle other than constantly looping and checking if the player is in a vehicle. (Or maybe there is?)

Set it on vehicle spawn? constantly loop while in no car, when the state changes, set current tick count in a variable outside the loop, and check to not repeat it until stored tickcount s bigger than 10000 ticks or something?

I’ve had this on my server for a while, but never seems to clean up anything?

1 Like

Thanks you so much for this scammer :slight_smile:

Scammer, this seems to cause the showroom functionality of freeroam to break (spawned in cars do not get deleted). Is there any way to implement while taking that into account?

my server is also always full that I see a ton of cars empty or crashed when I drive around especially on downtown does this script help that out?

Many thanks! good work

This still functions as intended? Or no?

A bit tired of having to run around and DV vehicles from a player who didn’t like the color sarcasm

This is no longer working and does not remover any vehicles.

I’ve modified Rottenv’s vehicle cleanup through changing natives, it cleans up vehicle once player exits, including peds, but not sure if I’m allowed to release it :confused:

Yo, could you add me on discord? гамз#5916

Its a good script to get rid of vehicle that are no longer used by players but when I have a foot bail and end up having a foot chase once for a whole you get back to your car it’s gone and so is the criminals car.

Define, “unused cars”. How does it determine what is unused?

1 Like

Yeah i would like to know too

@Fourthbeam @Rubylium Well if you actually looked at the code you can see what native is being invoked when the client is in a vehicle. It is set to no longer needed so once that vehicle is not being used it will be deleted as determined by the engine.

hello, is it going to delete planes,tanks,peds that hackers spawn?

For me the cars just stick around forever.
I did find that using a menu to turn the cars engine off then leaving it, soon it will despawn after that.