JebediahKerman Posted January 19, 2014 Share Posted January 19, 2014 Hey guys, I've been wondering if It would be possible to Spawn a Pedestrian on the Streets, or other open areas, near the player. The Player.Character.Position.Around(50); seems to give a random value around the Player and therefore the Pedestrians often get stuck. If I call a Taxi from Roman for example, the cab doesn't get stuck so how could I accomplish this? Link to comment Share on other sites More sharing options...
stef538 Posted January 19, 2014 Share Posted January 19, 2014 Try something like this. I guess you're scripting in C# Private ped RandPed; this.RandPed = World.GetClosestPed(Player.Character.Position, 50F); 50F can also be 100F or 200F, but that doesn't matter because he will always select the closest. if you want to know where your ped is, you can use : this.RandPed.AttachBlip(); Ps. Sorry for my bad english, it isn't my native language (: Link to comment Share on other sites More sharing options...
JebediahKerman Posted January 19, 2014 Author Share Posted January 19, 2014 Thanks for your post but I've been dumb. There is the Method called World.GetNextPositionOnStreet(Vector3 pos) which does exactly what I wanted. And btw I'm not a Native English too. Link to comment Share on other sites More sharing options...
stef538 Posted January 19, 2014 Share Posted January 19, 2014 Thanks for your post but I've been dumb. There is the Method called World.GetNextPositionOnStreet(Vector3 pos) which does exactly what I wanted. And btw I'm not a Native English too. Good that it's solved (: Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now