AudioClient

setStaticEmitterEnabled

SET_STATIC_EMITTER_ENABLED0x399D2D3B33F1B8EB

The GTA V native SET_STATIC_EMITTER_ENABLED of the AUDIO namespace, as LS:MP client scripts call it: the global function setStaticEmitterEnabled, in JavaScript and in Lua.

SignatureJavaScript
setStaticEmitterEnabled(emitterName: string, toggle: boolean): void
SignatureLua
setStaticEmitterEnabled(emitterName: string, toggle: boolean)

Usage

JavaScript
setStaticEmitterEnabled(emitterName, toggle);
Lua
setStaticEmitterEnabled(emitterName, toggle)

Parameters

ParameterTypeJavaScriptLua
emitterNamestringstringstring
toggleBOOLbooleanboolean

Returns

Nothing. In JavaScript the call evaluates to undefined.

Notes

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

Example:

setStaticEmitterEnabled((Any*)"LOS_SANTOS_VANILLA_UNICORN_01_STAGE", false);    setStaticEmitterEnabled((Any*)"LOS_SANTOS_VANILLA_UNICORN_02_MAIN_ROOM", false);    setStaticEmitterEnabled((Any*)"LOS_SANTOS_VANILLA_UNICORN_03_BACK_ROOM", false);

This turns off surrounding sounds not connected directly to peds.

Full list of static emitters by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/staticEmitters.json

Reference

Namespace
Audio AUDIO
In the game
void SET_STATIC_EMITTER_ENABLED(const char* emitterName, BOOL toggle)
Hash
0x399D2D3B33F1B8EB

Open in the interactive natives reference