Advertisement
Guest User

GTA5 Ped drive to waypoint

a guest
May 18th, 2018
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.69 KB | None | 0 0
  1. //For the 6th arg in TASK_VEHICLE_DRIVE_TO_COORD
  2. enum DrivingMode
  3. {
  4.     Rushed,
  5.     Obey,
  6.     Fast,
  7.     Stop,
  8.     Avoid,
  9.     Overtake,
  10.     Expert,
  11. };
  12.  
  13.  
  14. void spawnChauffer()
  15. {
  16.     int WaypointHandle = GET_FIRST_BLIP_INFO_ID(8);                            
  17.     if(DOES_BLIP_EXIST(WaypointHandle))
  18.     {
  19.         Vector3 waypoint1 = GET_BLIP_COORDS(WaypointHandle);
  20.         int veh = spawnCar::spawnVehicle("stretch");
  21.         if (veh != 0)
  22.         {
  23.             int Driver = CREATE_RANDOM_PED_AS_DRIVER(veh,false);
  24.             PED::SET_PED_INTO_VEHICLE(Driver , veh, -1);
  25.             TASK_VEHICLE_DRIVE_TO_COORD_LONGRANGE(Driver, veh, waypoint1.x, waypoint1.y, waypoint1.z, 40, Rushed, -1);
  26.             set_status_text("Spawned!");
  27.         }
  28.     }
  29.     else
  30.         print("Please choose a waypoint"); 
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement