TASK_COMBAT_HATED_TARGETS_IN_AREA
Despite its name, it only attacks ONE hated target.
Hash
0x4CF5F55DAC3280A0Runtime name
TaskCombatHatedTargetsInAreaNamespaceTASK
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0x4CF5F55DAC3280A0Signature
void TASK_COMBAT_HATED_TARGETS_IN_AREA(Ped ped, float x, float y, float z, float radius, int flags, Any p6);Parameters
| Name | Type | Description |
|---|---|---|
ped | Ped | — |
x | float | — |
y | float | — |
z | float | — |
radius | float | — |
flags | int | — |
p6 | Any | — |
Returns void
Description
Despite its name, it only attacks ONE hated target. The one closest to the specified position.
Usage
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#
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);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. Write10.0orvalue + 0.0. The generated JS wrappers add0.0000001to non-zero floats for the same reason.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.