Log in to reply
 

[C#] Driver



  • 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;
    Wait(6000);
    meccanico.Task.LeaveVehicle();



  • 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.
    http://gtaforums.com/topic/822314-guide-driving-styles/

    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);
    seq.AddTask.LeaveVehicle();
    seq.Close(false);
    meccanico.Task.PerformSequence(seq);


Log in to reply
 

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.