SetAmbientSoundEnabled: Difference between revisions
Jump to navigation
Jump to search
(Created page with "__NOTOC__ {{Server client function}} This function allows you to disable some background sound effects. ==Syntax== <syntaxhighlight lang="lua"> bool setAmbientSoundEnabled( string type, bool e...") |
No edit summary |
||
Line 5: | Line 5: | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
bool setAmbientSoundEnabled( string | bool setAmbientSoundEnabled( string theType, bool enable ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===Required Arguments=== | ===Required Arguments=== | ||
*''' | *'''theType:''' The type of ambient sound to toggle. Can be either "gunfire" or "general". | ||
*'''enable :''' Set ''false'' to turn off, ''true'' to turn on | *'''enable :''' Set ''false'' to turn off, ''true'' to turn on | ||
Revision as of 22:29, 30 July 2011
This function allows you to disable some background sound effects.
Syntax
bool setAmbientSoundEnabled( string theType, bool enable )
Required Arguments
- theType: The type of ambient sound to toggle. Can be either "gunfire" or "general".
- enable : Set false to turn off, true to turn on
Returns
Returns true if the ambient sound was set correctly, false if invalid values were passed.
Example
This example turns off the ambient water and gunfire sounds:
setAmbientSoundEnabled( "general", false ) setAmbientSoundEnabled( "gunfire", false )
See Also
- areTrafficLightsLocked
- getAircraftMaxHeight
- getAircraftMaxVelocity
- getCloudsEnabled
- getFarClipDistance
- getFogDistance
- getGameSpeed
- getGravity
- getHeatHaze
- getInteriorSoundsEnabled
- getJetpackMaxHeight
- getMinuteDuration
- getMoonSize
- getOcclusionsEnabled
- getRainLevel
- getSunColor
- getSunSize
- getTime
- getTrafficLightState
- getWeather
- getWindVelocity
- getSkyGradient
- getPlayerBlurLevel
- getZoneName
- isGarageOpen
- removeWorldModel
- resetFarClipDistance
- resetFogDistance
- resetHeatHaze
- resetMoonSize
- resetRainLevel
- resetSkyGradient
- resetSunColor
- resetSunSize
- resetWindVelocity
- restoreAllWorldModels
- restoreWorldModel
- setAircraftMaxHeight
- setAircraftMaxVelocity
- setCloudsEnabled
- setFarClipDistance
- setFogDistance
- setGameSpeed
- setGarageOpen
- setGravity
- setHeatHaze
- setInteriorSoundsEnabled
- setMinuteDuration
- setMoonSize
- setOcclusionsEnabled
- setRainLevel
- setSkyGradient
- setSunColor
- setSunSize
- setTime
- setTrafficLightState
- setTrafficLightsLocked
- setWeather
- setWeatherBlended
- setWindVelocity
- setJetpackMaxHeight
- setPlayerBlurLevel