The Lab
TASK native

TASK_GO_TO_ENTITY

returns void7 paramsbuild 1207

Tasks ped to go to target and stay within distance, moving at speed for up to duration milliseconds.

Signature

C
void TASK_GO_TO_ENTITY(Ped ped, Entity target, int duration, float distance, float speed, float p5, int p6); // 0x6A071245EB0D1882 b1207

Parameters

#NameType
1pedPed
2targetEntity
3durationint
4distancefloat
5speedfloat
6p5float
7p6int

Facts

Facts about TASK_GO_TO_ENTITY
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.

Lua
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
)
JavaScript
// 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
);
C#
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
);
All TASK natives

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