[HELP] Parked Veh native not working?

Im trying to use SetParkedVehicleDensityMultiplierThisFrame() Native but it does not seem to work. Ill attach a screenshot below to show you how i run it. Any and all help is appreciated

UPDATE: I made a video to show what the command shows in game, i have no scripts overriding at all iv even disabled all scripts except for that but to no avail. VIDEO VVVV

But those are not parked vehicles :confused:

No the video doenst show hte parked vehicles the video shows the values of the native which should be 0.0 but is 1.0

I’m sorry I didn’t pay enough attention.
So basically, when you call the command via the chat it returns 1.0, but when you call it in F8 it returns 0?
It’s so weird :confused: Maybe it’s a FiveM/Rockstar bug

Might be im not sure but i havnt seen it before :man_shrugging: Iv tried on my main server and a localhost and still doenst work

Fixed by Bunkie on Discord

local iPlayer = GetEntityCoords(PlayerPedId())
RemoveVehiclesFromGeneratorsInArea(iPlayer.x - 5000.0, iPlayer.y - 5000.0, iPlayer.z - 5000.0, iPlayer.x + 5000.0, iPlayer.y + 5000.0, iPlayer.z + 5000.0);
1 Like

Don’t.
Use.
That.
Function.

It will spam a network game event any time you use it (likely on tick?..) which will eventually lead to a network event pool overflow and you or others complaining about the ensuing crash.

Im guessing you mean the removeVehiclesFromGeneratorsInArea one, IS there another way that would work since for some reason the SetParkedVehicleDensityMultiplierThisFrame doesnt work? Tried on onesync, without onesync, windows, linux and a good few diff artifacts ranging from 2766 upwards

Do you have an update to me regarding my post above? Its one of the things stopping me from releasing my server to the public

To disable vehicle spawning you can use :

SetAllVehicleGeneratorsActiveInArea(coords - range, coords + range, false, false)

You can call it once on script startup. I don’t know if it will cause issues as the other native.

I just need parked cars to be disabled, What does htat natvie do?

I use it to prevent vehicle from spawning onto parking lot but never tried with a larger range.

Im not sure if that would cuase the same issue that Bubble said above or not