RedM Natives

TASK_GOTO_ENTITY_AIMING

Hash0xA9DA48FAB8A76C12
Runtime nameTaskGotoEntityAiming
NamespaceTASK
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0xA9DA48FAB8A76C12

Signature

void TASK_GOTO_ENTITY_AIMING(Ped ped, Entity target, float distanceToStopAt, float StartAimingDist);

Parameters

NameTypeDescription
pedPed—
targetEntity—
distanceToStopAtfloat—
StartAimingDistfloat—

Returns void

Description

ped = Ped you want to perform this task.
target = the Entity they should aim at.
distanceToStopAt = distance from the target, where the ped should stop to aim.
StartAimingDist = distance where the ped should start to aim.

Usage

Lua
TaskGotoEntityAiming(ped, target, distanceToStopAt, StartAimingDist)

-- always works, by hash
Citizen.InvokeNative(0xA9DA48FAB8A76C12, ped, target, distanceToStopAt, StartAimingDist)
JavaScript and C#
JavaScript
TaskGotoEntityAiming(ped, target, distanceToStopAt, StartAimingDist);

// by hash
Citizen.invokeNative('0xA9DA48FAB8A76C12', ped, target, distanceToStopAt + 0.0000001, StartAimingDist + 0.0000001);
C#
Function.Call((Hash)0xA9DA48FAB8A76C12, ped, target, distanceToStopAt, StartAimingDist);
  • 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.