TASK_GO_TO_ENTITY
Tasks ped to go to target and stay within distance, moving at speed for up to duration milliseconds.
Signature
void TASK_GO_TO_ENTITY(Ped ped, Entity target, int duration, float distance, float speed, float p5, int p6); // 0x6A071245EB0D1882 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | ped | Ped |
| 2 | target | Entity |
| 3 | duration | int |
| 4 | distance | float |
| 5 | speed | float |
| 6 | p5 | float |
| 7 | p6 | int |
Facts
| Name | TASK_GO_TO_ENTITY |
|---|---|
| Hash | 0x6A071245EB0D1882 |
| 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(0x6A071245EB0D1882, -- TASK_GO_TO_ENTITY
PlayerPedId(), -- Ped ped
PlayerPedId(), -- Entity target
0, -- int duration
0.0, -- float distance
0.0, -- float speed
0.0, -- float p5
0 -- int p6
)// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
Citizen.invokeNative("0x6A071245EB0D1882", // TASK_GO_TO_ENTITY
PlayerPedId(), // Ped ped
PlayerPedId(), // Entity target
0, // int duration
0.0, // float distance
0.0, // float speed
0.0, // float p5
0 // int p6
);Function.Call((Hash)0x6A071245EB0D1882, // TASK_GO_TO_ENTITY
API.PlayerPedId(), // Ped ped
API.PlayerPedId(), // Entity target
0, // int duration
0.0f, // float distance
0.0f, // float speed
0.0f, // float p5
0 // int p6
);Related TASK natives
- TASK_GO_TO_ENTITY_WHILE_AIMING_AT_ENTITY
- TASK_GO_TO_ENTITY_WHILE_AIMING_AT_ENTITY_USING_COMBAT_STYLE
- TASK_GO_STRAIGHT_TO_COORD_RELATIVE_TO_ENTITY
- TASK_GO_TO_COORD_WHILE_AIMING_AT_ENTITY
- TASK_GO_TO_COORD_WHILE_AIMING_AT_ENTITY_USING_COMBAT_STYLE
- 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_ANY_MEANS
- TASK_GO_TO_COORD_ANY_MEANS_EXTRA_PARAMS
- TASK_GO_TO_COORD_ANY_MEANS_EXTRA_PARAMS_WITH_CRUISE_SPEED
- TASK_GO_TO_COORD_WHILE_AIMING_AT_COORD
- TASK_GO_TO_COORD_WHILE_AIMING_AT_COORD_USING_COMBAT_STYLE
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.