getSoundMaxDistance
Client-side
Server-side
Shared
Pair: setSoundMaxDistance
Gets a custom sound max distance at which the sound stops.
OOP Syntax Help! I don't understand this!
- Method: sound:getMaxDistance(...)
- Variable: .maxDistance
Syntax
int|false getSoundMaxDistance ( sound theSound )
Required Arguments
- theSound: A sound element.
Returns
- int|false: max-distance
Returns an integer of the max distance, false if invalid arguments where passed.
Code Examples
client
local sound = playSound3D("sounds/song.mp3", 373.14, -125.21, 1001, true)
function getmaxdistanceFunc() outputChatBox("Max distance: " .. getSoundMaxDistance(sound))endaddCommandHandler("getmaxdistance", getmaxdistanceFunc)
See Also
Audio Functions
- getRadioChannel
- getRadioChannelName
- getSFXStatus
- getSoundBPM
- getSoundBufferLength
- getSoundEffectParameters
- getSoundFFTData
- getSoundEffects
- getSoundLength
- getSoundMaxDistance
- getSoundLevelData
- getSoundMetaTags
- getSoundMinDistance
- getSoundPan
- getSoundPosition
- getSoundSpeed
- getSoundWaveData
- getSoundVolume
- isSoundPaused
- isSoundPanningEnabled
- playSFX
- isSoundLooped
- getSoundProperties
- playSound
- playSFX3D
- setRadioChannel
- playSound3D
- setSoundEffectParameter
- setSoundEffectEnabled
- setSoundLooped
- setSoundMaxDistance
- setSoundMinDistance
- setSoundPan
- setSoundPaused
- setSoundPanningEnabled
- setSoundSpeed
- setSoundPosition
- setSoundProperties
- setSoundVolume
- stopSound