RedM Natives

TASK_GO_TO_ENTITY

Hash0x6A071245EB0D1882
Runtime nameTaskGoToEntity
NamespaceTASK
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x6A071245EB0D1882

Signature

void TASK_GO_TO_ENTITY(Ped ped, Entity target, int duration, float distance, float speed, float p5, int p6);

Parameters

NameTypeDescription
pedPed—
targetEntity—
durationint—
distancefloat—
speedfloat—
p5float—
p6int—

Returns void

Usage

Lua
TaskGoToEntity(ped, target, duration, distance, speed, p5, p6)

-- always works, by hash
Citizen.InvokeNative(0x6A071245EB0D1882, ped, target, duration, distance, speed, p5, p6)
JavaScript and C#
JavaScript
TaskGoToEntity(ped, target, duration, distance, speed, p5, p6);

// by hash
Citizen.invokeNative('0x6A071245EB0D1882', ped, target, duration, distance + 0.0000001, speed + 0.0000001, p5 + 0.0000001, p6);
C#
Function.Call((Hash)0x6A071245EB0D1882, ped, target, duration, distance, speed, p5, p6);
  • Float parameters: Lua integers (10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write 10.0 or value + 0.0. The generated JS wrappers add 0.0000001 to non-zero floats for the same reason.

Sources

alloc8or RDR3 NativeDB

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.