Jump to content
7katwoal12

Make ped drive a car

Recommended Posts

hi! i want a ped to drive a  car. i have this code but it doesn't work. The car gets stopped in the spawn point. Thanks for the support

this.suspect.Tasks.DriveToPosition(car, spawn1, 30, VehicleDrivingFlags.FollowTraffic, 1000);

.

Share this post


Link to post
Share on other sites

Don't know why you've got you're accepted distance to 1000, just try it with the parameters given:

suspect.Tasks.DriveToPosition(carToDriveWith, PositiontoDriveTo, SpeedToDriveAt,
    VehicleDrivingFlag, DistanceToStopFrom);

 

if it still doesn't work show us your code.

Edited by NoNameSet

Share this post


Link to post
Share on other sites
17 minutes ago, NoNameSet said:

Don't know why you've got you're accepted distance to 1000, just try it with the parameters given:


suspect.Tasks.DriveToPosition(carToDriveWith, PositiontoDriveTo, SpeedToDriveAt,
    VehicleDrivingFlag, DistanceToStopFrom);

 

if it still doesn't work show us your code.

I have fixed it thanks. The problem was that the start point and the end point were the same. Thanks

Share this post


Link to post
Share on other sites

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

×