isSoundPaused
Client-side
Server-side
Shared
Pair: setSoundPaused
This function is used to return the current pause state of the specified sound element.
If the element is a player, this function will use the players voice.
OOP Syntax Help! I don't understand this!
- Method:theSound:isPaused(...)
- Variable: .paused
Syntax
bool isSoundPaused ( sound/player theSound )Required arguments
- theSound: The sound element which pause state you want to return.
Returns
Returns true if the sound element is paused, false if unpaused or invalid arguments were passed.
- bool: result
Code Examples
client
This example will check and see if the sound is paused or not, and tell the player.
local theSound = playSound("music/song.mp3")
function checkSongPause() local pause = isSoundPaused(theSound) if(pause) then outputChatBox("The sound is paused!") else outputChatBox("The sound is not paused!") endendaddCommandHandler("checkpause", checkSongPause)Changelog
Added player element to use a players voice.
See Also
Audio Functions
- getRadioChannel
- getRadioChannelName
- getSFXStatus
- getSoundBPM
- getSoundBufferLength
- getSoundEffectParameters
- getSoundEffects
- getSoundFFTData
- getSoundLength
- getSoundLevelData
- getSoundMaxDistance
- getSoundMetaTags
- getSoundMinDistance
- getSoundPan
- getSoundPosition
- getSoundProperties
- getSoundSpeed
- getSoundVolume
- getSoundWaveData
- isSoundLooped
- isSoundPanningEnabled
- isSoundPaused
- playSFX
- playSFX3D
- playSound
- playSound3D
- playSoundFrontEnd
- setRadioChannel
- setSoundEffectEnabled
- setSoundEffectParameter
- setSoundLooped
- setSoundMaxDistance
- setSoundMinDistance
- setSoundPan
- setSoundPanningEnabled
- setSoundPaused
- setSoundPosition
- setSoundProperties
- setSoundSpeed
- setSoundVolume
- stopSound