Jump to content

Large Crowds


Recommended Posts

Hello

1. Is there a way to spawn large amount of people/crowds without having to spawn them in manually one by one (cause that's gonna take a lot of time)?

2. Generally what would be the largest number of peds you could spawn with becoming unstable or crashing?

3. Would there be a way to set it to spawn any ped except one single model?

Thanks guys.

ScottyTooHotty

Link to comment
Share on other sites

1. Use a for() loop.

2. The number of peds that can be spawned without crashing varies per computer, depending on specs.

3. Yes, simply add an if () check to see if the ped model matches the model you don't want and delete it again.

My YouTube: Click here. 

My Discord Server - https://discord.gg/0taiZvBSiw5qGAXU

Useful post? Let me and others know by clicking the Like button.
Check out my many script modifications! 
Having issues? LSPDFR Troubleshooter by Albo1125.

Link to comment
Share on other sites

41 minutes ago, Albo1125 said:

1. Use a for() loop.

2. The number of peds that can be spawned without crashing varies per computer, depending on specs.

3. Yes, simply add an if () check to see if the ped model matches the model you don't want and delete it again.

I'm so bad at this, too quick to post on the forums. Figured out 1 and 3 myself after posting, sorry.

However, for the second one regarding the number of peds, what would you say would be generally an acceptable amount if this was a callout being released to the community.

ScottyTooHotty

Link to comment
Share on other sites

30 minutes ago, ScottehBoyy said:

I'm so bad at this, too quick to post on the forums. Figured out 1 and 3 myself after posting, sorry.

However, for the second one regarding the number of peds, what would you say would be generally an acceptable amount if this was a callout being released to the community.

I've never actually really pushed it to the limit - my bank heist is pretty intensive though. I think there are roughly 30-40 peds that are all being controlled via custom built AI. Low specced pcs seem JUST to be able to handle that.

Edited by Albo1125

My YouTube: Click here. 

My Discord Server - https://discord.gg/0taiZvBSiw5qGAXU

Useful post? Let me and others know by clicking the Like button.
Check out my many script modifications! 
Having issues? LSPDFR Troubleshooter by Albo1125.

Link to comment
Share on other sites

54 minutes ago, Albo1125 said:

I've never actually really pushed it to the limit - my bank heist is pretty intensive though. I think there are roughly 30-40 peds that are all being controlled via custom built AI. Low specced pcs seem JUST to be able to handle that.

Right I see, so really though think you'd be able to have a lot more peds that were just wandering rather than following custom AI?

ScottyTooHotty

Link to comment
Share on other sites

12 minutes ago, ScottehBoyy said:

Right I see, so really though think you'd be able to have a lot more peds that were just wandering rather than following custom AI?

Yea, probably.

Trial and error is going to be your best bet here, I'm not sure myself what the limit is.

My YouTube: Click here. 

My Discord Server - https://discord.gg/0taiZvBSiw5qGAXU

Useful post? Let me and others know by clicking the Like button.
Check out my many script modifications! 
Having issues? LSPDFR Troubleshooter by Albo1125.

Link to comment
Share on other sites

You could also put an option in your INI file letting people set a maximum crowd size. That way people with lower spec computers could still use it, and just configure a smaller number of people in the crowd. 

[REL] Coastal Callouts: An action-packed mod with new vehicles, maps, capabilities, and callouts in and around the waters of Los Santos

[REL] Police Tape: Make your scenes more realistic while stopping peds and traffic

[REL] Better EMS: Realistic and dynamic EMS response

Join the Parks Benefactor Program to support my work and get early beta access!

Link to comment
Share on other sites

7 minutes ago, PNWParksFan said:

You could also put an option in your INI file letting people set a maximum crowd size. That way people with lower spec computers could still use it, and just configure a smaller number of people in the crowd. 

That's a sweet idea although I have never incorporated an INI into my coding so I'd need to learn :D But I'm all up for learning new things!

ScottyTooHotty

Link to comment
Share on other sites

1 minute ago, ScottehBoyy said:

That's a sweet idea although I have never incorporated an INI into my coding so I'd need to learn :D But I'm all up for learning new things!

There is an example in the API Examples git repo: 

https://github.com/LMSDev/LSPDFR-API/tree/master/Utilities/IniFileDemo

[REL] Coastal Callouts: An action-packed mod with new vehicles, maps, capabilities, and callouts in and around the waters of Los Santos

[REL] Police Tape: Make your scenes more realistic while stopping peds and traffic

[REL] Better EMS: Realistic and dynamic EMS response

Join the Parks Benefactor Program to support my work and get early beta access!

Link to comment
Share on other sites

In IV I was able to control 40 peds even on a very weak laptop but they all were spawned by the game, I just took control over all peds in the area that fit the criteria. V is way more stable and efficient in memory control, I believe you can try to actually SPAWN 50 peds but remember to do it in a separate fiber and set them as permanent so they won't be despawned.

 

Link to comment
Share on other sites

10 hours ago, LtFlash said:

In IV I was able to control 40 peds even on a very weak laptop but they all were spawned by the game, I just took control over all peds in the area that fit the criteria. V is way more stable and efficient in memory control, I believe you can try to actually SPAWN 50 peds but remember to do it in a separate fiber and set them as permanent so they won't be despawned.

 

Yeah, I'm looking for as many peds as possible. Thank you for that.

ScottyTooHotty

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...