IsSoundPaused: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
mNo edit summary |
||
(12 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Client function}} | {{Client function}} | ||
This function is used to return the current pause state of the specified [[sound]] element. | 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. | {{New feature/item|3.0132|1.3.2|| | ||
If the element is a [[player]], this function will use the players voice. | |||
}} | }} | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua">bool isSoundPaused ( element theSound )</syntaxhighlight> | <syntaxhighlight lang="lua">bool isSoundPaused ( element theSound )</syntaxhighlight> | ||
{{OOP||[[sound]]:isPaused|paused|setSoundPaused}} | |||
===Required Arguments=== | ===Required Arguments=== | ||
*'''theSound:''' | *'''theSound:''' the [[sound]] [[element]] which pause state you want to return. | ||
===Returns=== | ===Returns=== | ||
Returns ''true'' if the [[sound]] element is paused, ''false'' if unpaused or invalid arguments were passed. | Returns ''true'' if the [[sound]] [[element]] is paused, ''false'' if unpaused or invalid arguments were passed. | ||
==Example== | ==Example== | ||
Line 37: | Line 38: | ||
==See Also== | ==See Also== | ||
{{Client_audio_functions}} | {{Client_audio_functions}} | ||
[[hu:isSoundPaused]] | |||
[[ar:isSoundPaused]] | |||
[[pt-br:isSoundPaused]] |
Latest revision as of 00:36, 18 August 2021
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.
Syntax
bool isSoundPaused ( element theSound )
OOP Syntax Help! I don't understand this!
- Method: sound:isPaused(...)
- Variable: .paused
- Counterpart: setSoundPaused
Required Arguments
Returns
Returns true if the sound element is paused, false if unpaused or invalid arguments were passed.
Example
This example will check and see if the sound is paused or not, and tell the player.
Click to collapse [-]
ClienttheSound = playSound("music/song.mp3") function checkSongPause() local pause = isSoundPaused(theSound) if(pause == true) then outputChatBox("The sound is paused!") else outputChatBox("The sound is not paused!") end end addCommandHandler("checkpause", checkSongPause)
Changelog
Version | Description |
---|
1.3.2 | Added player element to use a players voice |
See Also
- getRadioChannel
- getRadioChannelName
- getSFXStatus
- getSoundBPM
- getSoundBufferLength
- getSoundEffectParameters
- getSoundEffects
- getSoundFFTData
- getSoundLength
- getSoundLevelData
- getSoundMaxDistance
- getSoundMetaTags
- getSoundMinDistance
- getSoundPan
- getSoundPosition
- getSoundProperties
- getSoundSpeed
- getSoundVolume
- getSoundWaveData
- isSoundLooped
- isSoundPanningEnabled
- isSoundPaused
- playSFX3D
- playSFX
- playSound3D
- playSound
- setRadioChannel
- setSoundEffectEnabled
- setSoundEffectParameter
- setSoundLooped
- setSoundMaxDistance
- setSoundMinDistance
- setSoundPan
- setSoundPanningEnabled
- setSoundPaused
- setSoundPosition
- setSoundProperties
- setSoundSpeed
- setSoundVolume
- stopSound
- Shared
- playSoundFrontEnd