in my mod there is a driver who drives to me and as soon as he reaches me, he park and comes out of the car, this is my code but I know it is not the way to go for it, also because he drives like a madman and invests me(lol) as I can do? thank you
meccanico.Task.DriveTo(spawnAuto, World.GetNextPositionOnStreet(player.Position), 0, 10);
spawnAuto.IsInvincible = true;
You should set the driving style to make them dive the way you want.
Some styles are.
1 = stop before vehicles
2 = stop before peds
4 = avoid vehicles
You simply add them up in this case 7.
More on driving styles here.
Instead of using a wait. And the giving a new task. You can use task sequence.
var seq = new TaskSequence();
seq.AddTask.DriveTo(spawnAuto, World.GetNextPositionOnStreet(player.Position), 5.0f, 30.0f, 7);