The Lab
TASK native

GET_SCENARIO_POINTS_IN_AREA

returns int6 paramsbuild 1207

Writes up to size scenario points within radius of the given position into scenariosInRadius and returns the count.

Signature

C
int GET_SCENARIO_POINTS_IN_AREA(float posX, float posY, float posZ, float radius, Any* scenariosInRadius, int size); // 0x345EC3B7EBDE1CB5 b1207

Parameters

#NameType
1posXfloat
2posYfloat
3posZfloat
4radiusfloat
5scenariosInRadiusAny* (out pointer)
6sizeint

Facts

Facts about GET_SCENARIO_POINTS_IN_AREA
Name
GET_SCENARIO_POINTS_IN_AREA
Hash
0x345EC3B7EBDE1CB5
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, scenariosInRadius = Citizen.InvokeNative(0x345EC3B7EBDE1CB5, -- GET_SCENARIO_POINTS_IN_AREA
  0.0, -- float posX
  0.0, -- float posY
  0.0, -- float posZ
  0.0, -- float radius
  Citizen.PointerValueInt(), -- Any* scenariosInRadius
  0, -- int size
  Citizen.ResultAsInteger()
)
print(result, scenariosInRadius)
JavaScript
// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
const [result, scenariosInRadius] = Citizen.invokeNative("0x345EC3B7EBDE1CB5", // GET_SCENARIO_POINTS_IN_AREA
  0.0, // float posX
  0.0, // float posY
  0.0, // float posZ
  0.0, // float radius
  Citizen.pointerValueInt(), // Any* scenariosInRadius
  0, // int size
  Citizen.resultAsInteger()
);
console.log(result, scenariosInRadius)
C#
var scenariosInRadiusArg = new OutputArgument();
int result = Function.Call<int>((Hash)0x345EC3B7EBDE1CB5, // GET_SCENARIO_POINTS_IN_AREA
  0.0f, // float posX
  0.0f, // float posY
  0.0f, // float posZ
  0.0f, // float radius
  scenariosInRadiusArg, // Any* scenariosInRadius
  0 // int size
);
int scenariosInRadius = scenariosInRadiusArg.GetResult<int>();
All TASK natives

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