Prop Limit Problem

Is there a prop limit that anyone knows about? I’ve spawned 80 fully grown weed plants, but after that, it only spawns grass. However, if I delete one, I can spawn a new one again. I don’t have any script that should impose a limit, and neither should the script I’m trying to run. I’ve tried using CreateObject, CreateObjectNoOffset, and ESX.Onesync.SpawnObject.

CreateObject doesn’t work correctly as I don’t get a valid entity ID. CreateObjectNoOffset works, but it stops spawning after reaching 80. ESX.Onesync.SpawnObject spawns correctly, but after reaching 80, it only spawns grass instead.

This script is a server-side script.

The grass grows through a thread that calls a function to replace the old model with the new one, effectively causing it to grow.

My System works by spawning grass, then replacing that model with a small tree. and then replacing that with a full-grown tree. The replace function is called inside a thread that just loops through a table full of props. There isn’t anything that should stop the script when I reach 80. That’s why I believe it’s a FiveM preset thing or something like that.

It’s defined by each server under propLimit , objectLimit :slight_smile:

Can you tell me where to find it? Is there any path, is it in server.cfg, Eaither way. Thanks!

In ESX with OneSync, there is a loop limit restriction for the ESX.Onesync.SpawnObject function to prevent excessive object spawning and ensure server stability and performance.

The specific loop limit for ESX.Onesync.SpawnObject can vary depending on the ESX version and server configuration. It is typically set to a reasonable value that strikes a balance between gameplay flexibility and server performance.

If you require the spawning of a large number of objects, you may need to consider alternative approaches or workarounds. For example, you can use object pooling techniques or dynamically load and unload objects based on player proximity or other criteria.

Thanks all the info i have for you :slight_smile: - sorry for slow reply had to fact check myself lol.

It’s worth mentioning that OneSync is free up to 48 slots, after such, you should get one of the following tiers from Patreon starting from FiveM Element Club Argentum 💿 .

So there’s no way I can change it?

This doesn’t make any sense, ESX doesn’t limit you from spawning objects.

There is a limit to the amount of objects you can have networked in an area, after which the client cannot create more. I’m pretty sure this limit is hard coded by GTA as I can’t find any reference to it on Game Pools.

The only work around is to sync the objects yourself (dummy objects have a high limit).

Well Yeah what you’re saying makes sense, but it doesn’t explain why I can keep placing grass… The grass places properly but I don’t think the entity id ever gets created. After I planted 80 full-grown trees it stops being able to grow for some reason, but I can still plant more grass models.

I couldn’t give you the answer to that one sadly :frowning: does it let you do it if the object isn’t networked?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.