Jump to content
  • 0

Why isn't any way to activate peds?


Spanish4Life

Question

I've been noticed there's a way to add peds to the game (as shown in CMultiplayerSA.cpp):

  
// SORT OF HACK to make peds always walk around, even when in free-camera mode (in the editor) 
 MemPut < BYTE > ( 0x53C017, 0x90 ); 
  

Howewer, there aren't a way to enable them, and further, there are another piece that seems that block its:

1317 // Disable CStreaming::StreamVehiclesAndPeds_Always 
1318 MemPut < BYTE > ( 0x40B650, 0xC3 ); 

So:

1.They're blocked?

2.Can this be possible

3. Already exists a function to do this?

Link to comment

Recommended Posts

  • 0
But if youy want population, you willn't create 19312318231293 peds to have enough....

It's "won't" and not "willn't" by the way.

Anyway, you don't need to create "9831928317" peds, you can actually put peds to the area that is streamed in for the local player, and then triggerClientEvent for see those peds.

Link to comment
  • 0
  • Discord Moderators

I didn't make that video, nor as far as I know the resource which it illustrates. I made something similar, inspired from P-Script's resource.

You can see the video here >

Showcases how peds are walking along on the street, much like the video Gothem linked.

As mentioned, both resources are inspired/originally based on P-Script's resource so it's pretty much his efforts you see. I've written my own version though, but probably wouldn't have happened without his resource.

Link to comment
  • 0

No, they don't. It looks much better when they walk along lines between those points instead of directly using their positions for destination. When you directly use the positions, you need to check if the ped is near the destination point, and if so, switch to the next. When you use lines between the path nodes, you can check the progress of walking from one point to another. An example:

               2 
A----1----B-------C 

A, B and C are the path nodes, 1 and 2 are ped positions. Let's say the ped is walking from point A to B and is in position 1. Then for some reason (for instance, someone pushes him) he appears in position 2 without coming in the range of path node B. So if he directly uses positions of nodes, he will still walk to B before switching destination to C. If he walks along the lines between nodes, the progress of walking from A to B will be more than 100% (as he's behind B if we look from the point A), so he can start walking along the line B-C.

Link to comment
  • 0

Of course, there must be some points, so that peds would know where the paths are. But that doesn't mean they must follow them in a way as if they were the final destinations. It's fine for a simple traffic system, but if you want them to react correctly to changing conditions, it's easier to use the way which I described.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...