setSoundMaxDistance
Client-side
 Server-side
 Shared
 Pair: getSoundMaxDistance
Sets a custom sound max distance at which the sound stops.
OOP Syntax Help! I don't understand this!
- Method: sound:setMaxDistance(...)
- Variable: .maxDistance
Syntax
bool setSoundMaxDistance ( sound theSound, int distance )Required Arguments
- theSound: A sound element.
- distance: The default value for this is 20.
Returns
- bool: result
Returns a true if the max distance was set, false otherwise.
Code Examples
 client   
 local sound = playSound3D("sounds/song.mp3", 373.14, -125.21, 1001, true)
function maxdistanceFunc(command, param)  setSoundMaxDistance(sound, tonumber(param))endaddCommandHandler("setmaxdistance", maxdistanceFunc)See Also
Audio Functions
- getSFXStatus
- getRadioChannel
- getSoundBPM
- getSoundBufferLength
- getRadioChannelName
- getSoundEffectParameters
- getSoundFFTData
- getSoundEffects
- getSoundLevelData
- getSoundMetaTags
- getSoundPan
- getSoundMinDistance
- getSoundMaxDistance
- getSoundPosition
- getSoundLength
- getSoundProperties
- getSoundVolume
- getSoundSpeed
- getSoundWaveData
- isSoundPanningEnabled
- playSFX3D
- isSoundPaused
- playSFX
- isSoundLooped
- playSound
- playSound3D
- setRadioChannel
- setSoundEffectEnabled
- setSoundLooped
- setSoundMaxDistance
- setSoundEffectParameter
- setSoundPan
- setSoundMinDistance
- setSoundPanningEnabled
- setSoundPaused
- setSoundPosition
- setSoundProperties
- setSoundSpeed
- setSoundVolume
- stopSound
 
 