_COUNT_PEDS_AWARE_OF_EVENT
Counts the peds within radius of the given point that are aware of shockingEvent, writing them to entities and returning the count.
Signature
int _COUNT_PEDS_AWARE_OF_EVENT(ScrHandle shockingEvent, float x, float y, float z, float radius, Any* entities); // 0xF4860514AD354226 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | shockingEvent | ScrHandle |
| 2 | x | float |
| 3 | y | float |
| 4 | z | float |
| 5 | radius | float |
| 6 | entities | Any* (out pointer) |
Facts
| 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.
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)// 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)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>();Related PED natives
- COUNT_PEDS_IN_COMBAT_WITH_TARGET
- COUNT_PEDS_IN_COMBAT_WITH_TARGET_WITHIN_RADIUS
- SET_BLOCKING_OF_NON_TEMPORARY_EVENTS_FOR_AMBIENT_PEDS_THIS_FRAME
- _GET_BLOCKING_OF_NON_TEMPORARY_EVENTS
- _GET_CATEGORY_OF_COMPONENT_AT_INDEX
- _GET_LASSOER_OF_PED
- _GET_NUM_RESERVED_AMBIENT_PEDS_DESIRED
- _GET_NUM_RESERVED_AMBIENT_PEDS_READY
- _GET_PEDS_IN_COMBAT_WITH_TARGET
- _GET_RIDER_OF_MOUNT
- _RESERVE_AMBIENT_PEDS
- _RESERVE_AMBIENT_PEDS_TOTAL
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.