RedM Natives

TASK_COMBAT_HATED_TARGETS_IN_AREA

Despite its name, it only attacks ONE hated target.

Hash0x4CF5F55DAC3280A0
Runtime nameTaskCombatHatedTargetsInArea
NamespaceTASK
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x4CF5F55DAC3280A0

Signature

void TASK_COMBAT_HATED_TARGETS_IN_AREA(Ped ped, float x, float y, float z, float radius, int flags, Any p6);

Parameters

NameTypeDescription
pedPed—
xfloat—
yfloat—
zfloat—
radiusfloat—
flagsint—
p6Any—

Returns void

Description

Despite its name, it only attacks ONE hated target. The one closest to the specified position.

Usage

Lua
TaskCombatHatedTargetsInArea(ped, x, y, z, radius, flags, p6)

-- always works, by hash
Citizen.InvokeNative(0x4CF5F55DAC3280A0, ped, x, y, z, radius, flags, p6)
JavaScript and C#
JavaScript
TaskCombatHatedTargetsInArea(ped, x, y, z, radius, flags, p6);

// by hash
Citizen.invokeNative('0x4CF5F55DAC3280A0', ped, x + 0.0000001, y + 0.0000001, z + 0.0000001, radius + 0.0000001, flags, p6);
C#
Function.Call((Hash)0x4CF5F55DAC3280A0, ped, x, y, z, radius, flags, 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.