stopSound
Client-side
Server-side
Shared
Stops the sound playback for specified sound element. The sound element is also destroyed.
OOP Syntax Help! I don't understand this!
- Method: sound:stop(...)
Syntax
bool stopSound ( sound theSound )
Required Arguments
- theSound: The sound element you want to stop playing.
Returns
- bool: result
Returns true if the sound was successfully stopped, false otherwise.
Code Examples
client
function startMySound() sound = playSound( "sound.mp3", true )endaddEventHandler( "onClientResourceStart", resourceRoot, startMySound )
function stopMySound() stopSound( sound )endaddCommandHandler ( "stopsound", stopMySound ) --using the command 'stopsound' will stop the sound
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