The Lab
TASK native

TASK_VEHICLE_DRIVE_TO_COORD

returns void11 paramsbuild 1207

Tasks ped to drive vehicle to (x, y, z) at speed with drivingStyle, stopping within stopRange.

Signature

C
void TASK_VEHICLE_DRIVE_TO_COORD(Ped ped, Vehicle vehicle, float x, float y, float z, float speed, int drivingStyle, Hash vehicleModel, int drivingMode, float stopRange, float straightLineDist); // 0xE2A2AA2F659D77A7 b1207

Parameters

#NameType
1pedPed
2vehicleVehicle
3xfloat
4yfloat
5zfloat
6speedfloat
7drivingStyleint
8vehicleModelHash
9drivingModeint
10stopRangefloat
11straightLineDistfloat

Facts

Facts about TASK_VEHICLE_DRIVE_TO_COORD
Name
TASK_VEHICLE_DRIVE_TO_COORD
Hash
0xE2A2AA2F659D77A7
Namespace
Returns
void
Game build
1207

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
Citizen.InvokeNative(0xE2A2AA2F659D77A7, -- TASK_VEHICLE_DRIVE_TO_COORD
  PlayerPedId(), -- Ped ped
  0, -- Vehicle vehicle
  0.0, -- float x
  0.0, -- float y
  0.0, -- float z
  0.0, -- float speed
  0, -- int drivingStyle
  GetHashKey("a_c_horse_arabian_white"), -- Hash vehicleModel
  0, -- int drivingMode
  0.0, -- float stopRange
  0.0 -- float straightLineDist
)
JavaScript
// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
Citizen.invokeNative("0xE2A2AA2F659D77A7", // TASK_VEHICLE_DRIVE_TO_COORD
  PlayerPedId(), // Ped ped
  0, // Vehicle vehicle
  0.0, // float x
  0.0, // float y
  0.0, // float z
  0.0, // float speed
  0, // int drivingStyle
  GetHashKey("a_c_horse_arabian_white"), // Hash vehicleModel
  0, // int drivingMode
  0.0, // float stopRange
  0.0 // float straightLineDist
);
C#
Function.Call((Hash)0xE2A2AA2F659D77A7, // TASK_VEHICLE_DRIVE_TO_COORD
  API.PlayerPedId(), // Ped ped
  0, // Vehicle vehicle
  0.0f, // float x
  0.0f, // float y
  0.0f, // float z
  0.0f, // float speed
  0, // int drivingStyle
  (uint)API.GetHashKey("a_c_horse_arabian_white"), // Hash vehicleModel
  0, // int drivingMode
  0.0f, // float stopRange
  0.0f // float straightLineDist
);
All TASK natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.