COUNT_PEDS_IN_COMBAT_WITH_TARGET_WITHIN_RADIUS
Hash
0x336B3D200AB007CBRuntime name
CountPedsInCombatWithTargetWithinRadiusNamespacePED
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0x336B3D200AB007CBSignature
int COUNT_PEDS_IN_COMBAT_WITH_TARGET_WITHIN_RADIUS(Ped ped, float x, float y, float z, float radius, int flag);Parameters
| Name | Type | Description |
|---|---|---|
ped | Ped | — |
x | float | — |
y | float | — |
z | float | — |
radius | float | — |
flag | int | — |
Returns int
Usage
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#
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());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. 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.