Car Generator Spawn Delete Please Help me

Hi I’m trying to make it where there are no NPC cars spawning I’ve already made the the ymaps in CodeWalker and I’ve got the fxmanifest made up and saying this_is_a_map ‘yes’ but it will not work I’ve had this working before in the past but it now no longer works if any one can help it would be awsome



Citizen.CreateThread(function()
	while true do
	    Citizen.Wait(0)
        local playerPed = GetPlayerPed(-1)
		local pos = GetEntityCoords(playerPed)
		RemoveVehiclesFromGeneratorsInArea(pos['x'] - 500.0, pos['y'] - 500.0, pos['z'] - 500.0, pos['x'] + 500.0, pos['y'] + 500.0, pos['z'] + 500.0);
	    SetVehicleDensityMultiplierThisFrame(0.0)
	    SetRandomVehicleDensityMultiplierThisFrame(0.0)
	    SetParkedVehicleDensityMultiplierThisFrame(0.0)
	end
end)

Use this code. It will remove all NPC vehicles

1 Like

It didn’t work

Do you by any chance know how to stream the ymap files at all that I’ve made

1 Like

I don’t believe you can just remove traffic without using scripts. Ymap car generators are usually for vehicles that spawn parked in driveways or whatever. You would have to completely turn off all traffic or I think you edit the nodes? Codewalker has a support server that may be able to assist you.

1 Like

So I don’t remember making a script within the the folder ever trying to delete traffic but it was working with just streaming the ymaps but that was a while ago so I would imagine a lot of stuff has changed for it but thanks for helping I will definitely check it out!

Your last option is to enable onsync infinity that will remove all traffic and peds

Try to use a npc control script like this:
GitHub Download

You just have to change the Density var to 0 in client.lua
Maybe you found 1 car every 5 min but not sure.

Do you know how to MAKE parked cars spawn in specific areas?

Ensure this and your problem will be resolverd.

Peace!

Codewalker, you add them to the ymap.

1 Like

I’ve added them to the ymaps but they don’t show up on my server when I stream. All other entities do, like if I add traffic cones or something, but the Car Generators do not.

1 Like

You’re doing something wrong then. There’s flags you enable to make the vehicles have a higher spawn rate. Also there’s a newer version of codewalker if you join their server. The one on GTA5Mods is old.

1 Like

Is it possible another resources is disabling the Car Generators?

Conflicting ymaps possibly. You may have a bunch of maps that share the same ymap names and you’ve added car gens to a bunch of ymaps, however because another map shares the same ymap files but they don’t have car gens, those files are overriding

1 Like

That’s what I’m thinking the issue is… Thank you for all of your help.

1 Like

One more question. Could OneSync infinity have anything to do with CarGens not showing up?

Possibly but I unfortunately don’t 100% know and don’t want to mislead you information. I how you figure it out though; it could be a script or maps conflicting, it could be anything.