RedM Natives

COUNT_PEDS_IN_COMBAT_WITH_TARGET_WITHIN_RADIUS

Hash0x336B3D200AB007CB
Runtime nameCountPedsInCombatWithTargetWithinRadius
NamespacePED
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x336B3D200AB007CB

Signature

int COUNT_PEDS_IN_COMBAT_WITH_TARGET_WITHIN_RADIUS(Ped ped, float x, float y, float z, float radius, int flag);

Parameters

NameTypeDescription
pedPed—
xfloat—
yfloat—
zfloat—
radiusfloat—
flagint—

Returns int

Usage

Lua
local retval = CountPedsInCombatWithTargetWithinRadius(ped, x, y, z, radius, flag)

-- always works, by hash
local retval = Citizen.InvokeNative(0x336B3D200AB007CB, ped, x, y, z, radius, flag, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = CountPedsInCombatWithTargetWithinRadius(ped, x, y, z, radius, flag);

// by hash
const retval = Citizen.invokeNative('0x336B3D200AB007CB', ped, x + 0.0000001, y + 0.0000001, z + 0.0000001, radius + 0.0000001, flag, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
int retval = Function.Call<int>((Hash)0x336B3D200AB007CB, ped, x, y, z, radius, flag);
  • 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.