TasksClient

doesScenarioOfTypeExistInArea

DOES_SCENARIO_OF_TYPE_EXIST_IN_AREA0x0A9D0C2A3BBC86C1

The GTA V native DOES_SCENARIO_OF_TYPE_EXIST_IN_AREA of the TASK namespace, as LS:MP client scripts call it: the global function doesScenarioOfTypeExistInArea, in JavaScript and in Lua.

SignatureJavaScript
doesScenarioOfTypeExistInArea(
  x: number,
  y: number,
  z: number,
  scenarioName: string,
  radius: number,
  mustBeFree: boolean
): boolean
SignatureLua
doesScenarioOfTypeExistInArea(
  x: number,
  y: number,
  z: number,
  scenarioName: string,
  radius: number,
  mustBeFree: boolean
): boolean

Usage

JavaScript
const result = doesScenarioOfTypeExistInArea(x, y, z, scenarioName, radius, mustBeFree);
Lua
local result = doesScenarioOfTypeExistInArea(x, y, z, scenarioName, radius, mustBeFree)

Three consecutive numbers can be given as one vector: { x, y, z } (or [x, y, z]) in JavaScript, a Vector3 in Lua.

JavaScript · with vectors
const result = doesScenarioOfTypeExistInArea(pos, scenarioName, radius, mustBeFree);
Lua · with vectors
local result = doesScenarioOfTypeExistInArea(pos, scenarioName, radius, mustBeFree)

Parameters

ParameterTypeJavaScriptLua
xfloatnumbernumber
yfloatnumbernumber
zfloatnumbernumber
scenarioNamestringstringstring
radiusfloatnumbernumber
mustBeFreeBOOLbooleanboolean

Returns

BOOL JavaScript boolean, Lua boolean

Reference

Namespace
Tasks TASK
In the game
BOOL DOES_SCENARIO_OF_TYPE_EXIST_IN_AREA(float x, float y, float z, const char* scenarioName, float radius, BOOL mustBeFree)
Hash
0x0A9D0C2A3BBC86C1

Open in the interactive natives reference