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
- getSoundEffectParameters
- getSoundBPM
- getSoundEffects
- getSoundFFTData
- getSoundBufferLength
- getSoundLength
- getSoundLevelData
- getSoundMetaTags
- getSoundMinDistance
- getSoundMaxDistance
- getSoundPan
- getSoundProperties
- getSoundSpeed
- getSoundVolume
- getSoundWaveData
- getSoundPosition
- isSoundPanningEnabled
- isSoundLooped
- isSoundPaused
- playSFX
- playSFX3D
- playSound3D
- playSound
- setSoundEffectEnabled
- setSoundEffectParameter
- setRadioChannel
- setSoundLooped
- setSoundMaxDistance
- setSoundMinDistance
- setSoundPan
- setSoundPanningEnabled
- setSoundSpeed
- setSoundVolume
- stopSound
- setSoundProperties
- setSoundPaused
- setSoundPosition