TASK_VEHICLE_DRIVE_TO_COORD
Tasks ped to drive vehicle to (x, y, z) at speed with drivingStyle, stopping within stopRange.
Signature
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 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | ped | Ped |
| 2 | vehicle | Vehicle |
| 3 | x | float |
| 4 | y | float |
| 5 | z | float |
| 6 | speed | float |
| 7 | drivingStyle | int |
| 8 | vehicleModel | Hash |
| 9 | drivingMode | int |
| 10 | stopRange | float |
| 11 | straightLineDist | float |
Facts
| 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.
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
)// 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
);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
);Related TASK natives
- TASK_VEHICLE_DRIVE_TO_DESTINATION
- TASK_VEHICLE_DRIVE_STRAIGHT_TO_POINT
- TASK_VEHICLE_DRIVE_WANDER
- _TASK_VEHICLE_DRIVE_TO_COORD_2
- TASK_GO_STRAIGHT_TO_COORD_RELATIVE_TO_ENTITY
- TASK_GO_TO_COORD_AND_AIM_AT_HATED_ENTITIES_NEAR_COORD
- TASK_GO_TO_COORD_AND_AIM_AT_HATED_ENTITIES_NEAR_COORD_USING_COMBAT_STYLE
- TASK_GO_TO_COORD_WHILE_AIMING_AT_COORD
- TASK_GO_TO_COORD_WHILE_AIMING_AT_COORD_USING_COMBAT_STYLE
- TASK_VEHICLE_AIM_AT_COORD
- TASK_VEHICLE_SHOOT_AT_COORD
- _TASK_VEHICLE_DRIVE_TO_DESTINATION_2
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.