The Lab
PED native

_COUNT_PEDS_AWARE_OF_EVENT

returns int6 paramsbuild 1207

Counts the peds within radius of the given point that are aware of shockingEvent, writing them to entities and returning the count.

Signature

C
int _COUNT_PEDS_AWARE_OF_EVENT(ScrHandle shockingEvent, float x, float y, float z, float radius, Any* entities); // 0xF4860514AD354226 b1207

Parameters

#NameType
1shockingEventScrHandle
2xfloat
3yfloat
4zfloat
5radiusfloat
6entitiesAny* (out pointer)

Facts

Facts about _COUNT_PEDS_AWARE_OF_EVENT
Name
_COUNT_PEDS_AWARE_OF_EVENT
Hash
0xF4860514AD354226
Namespace
Returns
int
Game build
1207

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
local result, entities = Citizen.InvokeNative(0xF4860514AD354226, -- _COUNT_PEDS_AWARE_OF_EVENT
  0, -- ScrHandle shockingEvent
  0.0, -- float x
  0.0, -- float y
  0.0, -- float z
  0.0, -- float radius
  Citizen.PointerValueInt(), -- Any* entities
  Citizen.ResultAsInteger()
)
print(result, entities)
JavaScript
// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
const [result, entities] = Citizen.invokeNative("0xF4860514AD354226", // _COUNT_PEDS_AWARE_OF_EVENT
  0, // ScrHandle shockingEvent
  0.0, // float x
  0.0, // float y
  0.0, // float z
  0.0, // float radius
  Citizen.pointerValueInt(), // Any* entities
  Citizen.resultAsInteger()
);
console.log(result, entities)
C#
var entitiesArg = new OutputArgument();
int result = Function.Call<int>((Hash)0xF4860514AD354226, // _COUNT_PEDS_AWARE_OF_EVENT
  0, // ScrHandle shockingEvent
  0.0f, // float x
  0.0f, // float y
  0.0f, // float z
  0.0f, // float radius
  entitiesArg // Any* entities
);
int entities = entitiesArg.GetResult<int>();
All PED natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.