Excessive AI Spawning

Hi, I’ve been having an issue within my server for quite some time now and the issue is that AI spawns excessively in one particular area of the map and they often spawn inside each other causing a chain reaction of explosions. I did some research and testing on my server and I’ve concluded that the reason for this ‘bug’ is because players were under the map.

These players were in a YMAP that was under the map. But, I do know that if players are in a GTA:Online apartment (or any interior for that matter) that is under the map, you will receive the same effect.

I do not know of any alternative ways to prevent this from happening, perhaps if it is a YMAP, create it somewhere far away from AI spawns.

I do not think this has anything to do with FiveM as this also appears in GTA:Online afaik. I did not want to make this a bug report because I don’t think FiveM developers could do anything about this. I made this post as an informative post to let the community aware and let them know what is causing it if you are having this issue.

Hope this post could help you guys :mascot:

explosions fun!

ah that’s very interesting…

yeah i wonder why all those under the map places weren’t way out to sea where this wouldn’t be a problem

anyhow… there is a native I noticed for this where you can set a zone as inactive. Also used for races and things.

If you wanna give it a try. SetZoneEnabled I think is the one that controls spawning in that zone.

Or you can play around with tweaking the schedule, search for other Zone natives.

Also, you could reduce the spawns overall while players are down under, with the usual suspects:

SetParkedVehicleDensityMultiplierThisFrame(density)SetVehicleDensityMultiplierThisFrame(density)
SetRandomVehicleDensityMultiplierThisFrame(density)
SetPedDensityMultiplierThisFrame(density)
SetScenarioPedDensityMultiplierThisFrame(density, density)

1 Like

@zee We have the same issue, maybe a networking bug of some sort :thinking:

maybe? … more people in an area shouldn’t be increasing the spawn density, I wouldn’t think.

does this also happen if a bunch of players just stand on the sidewalk, not under the map?

Anyone know more information about this problem? I would like to fix this random explosions.