TasksClient

isScenarioTypeEnabled

IS_SCENARIO_TYPE_ENABLED0x3A815DB3EA088722

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

SignatureJavaScript
isScenarioTypeEnabled(scenarioType: string): boolean
SignatureLua
isScenarioTypeEnabled(scenarioType: string): boolean

Usage

JavaScript
const result = isScenarioTypeEnabled(scenarioType);
Lua
local result = isScenarioTypeEnabled(scenarioType)

Parameters

ParameterTypeJavaScriptLua
scenarioTypestringstringstring

Returns

BOOL JavaScript boolean, Lua boolean

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Full list of scenario types used in scripts by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/scenariosCompact.json
Occurrences in the b617d scripts:
"PROP_HUMAN_SEAT_CHAIR",
"WORLD_HUMAN_DRINKING",
"WORLD_HUMAN_HANG_OUT_STREET",
"WORLD_HUMAN_SMOKING",
"WORLD_MOUNTAIN_LION_WANDER",
"WORLD_HUMAN_DRINKING"

Sometimes used together with isStringNullOrEmpty in the scripts.

scenarioType could be the same as scenarioName, used in for example taskStartScenarioAtPosition.

Reference

Namespace
Tasks TASK
In the game
BOOL IS_SCENARIO_TYPE_ENABLED(const char* scenarioType)
Hash
0x3A815DB3EA088722

Open in the interactive natives reference