ZonesClientChecked by LS:MP

setZoneEnabled

SET_ZONE_ENABLED0xBA5ECEEA120E5611

The GTA V native SET_ZONE_ENABLED of the ZONE namespace, as LS:MP client scripts call it: the global function setZoneEnabled, in JavaScript and in Lua.

SignatureJavaScript
setZoneEnabled(zoneId: number, toggle: boolean): void
SignatureLua
setZoneEnabled(zoneId: integer, toggle: boolean)

Usage

JavaScript
setZoneEnabled(zoneId, toggle);
Lua
setZoneEnabled(zoneId, toggle)

Parameters

ParameterTypeJavaScriptLua
zoneIdintnumberinteger
toggleBOOLbooleanboolean

Returns

Nothing. In JavaScript the call evaluates to undefined.

On LS:MP

ℹ
Checked by LS:MP

zoneId must be the index of a zone that exists. Otherwise the call is ignored: nothing reaches the game, and no error is raised.

Reference

Namespace
Zones ZONE
In the game
void SET_ZONE_ENABLED(int zoneId, BOOL toggle)
Hash
0xBA5ECEEA120E5611

Open in the interactive natives reference