TasksClient

isScenarioGroupEnabled

IS_SCENARIO_GROUP_ENABLED0x367A09DED4E05B99

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

SignatureJavaScript
isScenarioGroupEnabled(scenarioGroup: string): boolean
SignatureLua
isScenarioGroupEnabled(scenarioGroup: string): boolean

Usage

JavaScript
const result = isScenarioGroupEnabled(scenarioGroup);
Lua
local result = isScenarioGroupEnabled(scenarioGroup)

Parameters

ParameterTypeJavaScriptLua
scenarioGroupstringstringstring

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 groups used in scripts by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/scenarioGroupNames.json
Occurrences in the b617d scripts:

"ARMY_GUARD",
"ARMY_HELI",
"BLIMP",
"Cinema_Downtown",
"Cinema_Morningwood",
"Cinema_Textile",
"City_Banks",
"Countryside_Banks",
"DEALERSHIP",
"KORTZ_SECURITY",
"LSA_Planes",
"MP_POLICE",
"Observatory_Bikers",
"POLICE_POUND1",
"POLICE_POUND2",
"POLICE_POUND3",
"POLICE_POUND4",
"POLICE_POUND5",
"Rampage1",
"SANDY_PLANES",
"SCRAP_SECURITY",
"SEW_MACHINE",
"SOLOMON_GATE"

Sometimes used with DOES_SCENARIO_GROUP_EXIST:

if (doesScenarioGroupExist("Observatory_Bikers") &&   (!isScenarioGroupEnabled("Observatory_Bikers"))) {
else if (isScenarioGroupEnabled("BLIMP")) {

Reference

Namespace
Tasks TASK
In the game
BOOL IS_SCENARIO_GROUP_ENABLED(const char* scenarioGroup)
Hash
0x367A09DED4E05B99

Open in the interactive natives reference