Disable MOST/ALL random parked cars?

How would I go about disabling a % of randomly parked cars, and/or all of them.

I was trying to use a no car jacking script but it conflicts with cop cars and such, and your own cars because my lock script isn’t fully functioning yet. Is there a way to disable random parked cars (Unless owned by a real player) or stolen by a player? AKA just the ones that spawn in automatically.

There are scenario’s you can disable that will get rid of some of these but for the most part these are ‘Car Generators’ that are included inside of the vanilla ymap files that make up the world. You can explore with CodeWalker to see all these locations and which ymaps they are contained in.

There are a few natives for vehicle generators that I’ve never tested before myself but you could play around with them and see if they actually help solve your problem. I went the other route with this problem and just prevented players from opening any parked vehicles without first running through a car jacking script to have control over it.

I’ve seen parked cars completely disabled on several servers… That’s my hope…

Pedestrians i’ll fix myself, I found a few tricks to LOWER the amount of driving peds, well… peds in general, but hopefully I can just reduce the amount of TRAFFIC and then disable PARKED cars.

1 Like

I forgot about this one

SetParkedVehicleDensityMultiplierThisFrame(0.0)

Put that into an infinite loop thread that runs on every tick and it should remove most of the parked vehicles.

Thanks anders, that one is going to come in very handy, now to learn how to loop them lol.

And how to create a script for all of these. :slight_smile: