Play sound to all players

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.
i think it's skquery or maybe skellet that has a play sound effect to all players. I'm not sure if the vanilla skript play sound effect can play to all players.

Just go to the docs and search 'sound' and find a syntax that supports multiple players
 
How do I play the thunder sound to all players? thanks
Always do a quick google or search the docs
I think this is what you need though:
Play Raw Sound
Addon: SkQuery
Patterns:
play raw sound %text% at %locations% with pitch %number% volume %number%
Imitates the functionality of the /playsound command, without the ability to specify target players.
Example:
code_language.skript:
on sneak toggle:
   play raw sound "mob.bat.death" at player with pitch 1 volume 10
- From docs ^
- My version I think will work V
code_language.skript:
on sneak toggle:
   play raw sound "mob.bat.death" to all players with pitch 1 volume 10
 
Always do a quick google or search the docs
I think this is what you need though:
Play Raw Sound
Addon: SkQuery
Patterns:
play raw sound %text% at %locations% with pitch %number% volume %number%
Imitates the functionality of the /playsound command, without the ability to specify target players.
Example:
code_language.skript:
on sneak toggle:
   play raw sound "mob.bat.death" at player with pitch 1 volume 10
- From docs ^
- My version I think will work V
code_language.skript:
on sneak toggle:
   play raw sound "mob.bat.death" to all players with pitch 1 volume 10
Or you could do this:
code_language.skript:
on sneak toggle:
    play "BAT_DEATH" to all players at volume 10

Either way works,
I understand, but I need the thunder sound. I can not find it anywhere for skript.
 
I understand, but I need the thunder sound. I can not find it anywhere for skript.
This literally took me less than 30 seconds, please use google to your advantage! Never the less, no hard feelings, cheers, just replace the batsound from the code above with one of these.
I think this is what you are looking for though,
ambient (Natural sounds)
- ambient.cave.cave[1-13]
- ambient.weather.thunder[1-13]

- ambient.weather.rain[1-8]
- entity.lightning.impact
- entity.lightning.thunder[1-3]
 
This literally took me less than 30 seconds, please use google to your advantage! Never the less, no hard feelings, cheers, just replace the batsound from the code above with one of these.
I think this is what you are looking for though,
ambient (Natural sounds)
- ambient.cave.cave[1-13]
- ambient.weather.thunder[1-13]
- ambient.weather.rain[1-8]
- entity.lightning.impact
- entity.lightning.thunder[1-3]
Use SkRayFall and this list which has the thunder sound effects on it. though this is also just found on the docs. It's good to research thoroughly.
https://hub.spigotmc.org/javadocs/spigot/
I've tried those, none of them work. I've researched this before posting in the thread.
 
There is helpful documentation on the forums tab. Try looking at it when you are stuck. It has served me a lot

code_language.skript:
play raw sound "entity.lightning.impact" at player with pitch 1 volume 10
 
  • Like
Reactions: Selvati
there's only so many play sound effects. If you pick one, we can troubleshoot from there, but the skrayfall ones I at least can confirm working since I use them on my server. Any relevant info as to errors, version etc are helpful to try and fix it. "it doesn't work" doesn't give us much to go onx3
 
There is helpful documentation on the forums tab. Try looking at it when you are stuck. It has served me a lot

code_language.skript:
play raw sound "entity.lightning.impact" at player with pitch 1 volume 10
There's no loop that matches 'loop-player with volume 10'
there's only so many play sound effects. If you pick one, we can troubleshoot from there, but the skrayfall ones I at least can confirm working since I use them on my server. Any relevant info as to errors, version etc are helpful to try and fix it. "it doesn't work" doesn't give us much to go onx3
When I use it correctly, it says that it doesn't understand the condition/effect.
 
There's no loop that matches 'loop-player with volume 10'

When I use it correctly, it says that it doesn't understand the condition/effect.
1: make sure you have to right addon and it's up to date.(skript as well. I use Bensku's fork dev 29)
2:make sure you've restarted your server
3: post the code containing your sound section as well.
 
use loop-player
I am
If you are using loop-player, use loop-player instead of player
else, if you are not looping a player, use player.
Thanks for pointing out the obvious xd
If you're using the bensku's fork and you're on 1.9+ (information you should provide, there is a help layout, you know) you can use the following effect of vanilla Skript:
http://bensku.github.io/Skript/effects.html#EffPlaySound
I'm not
[doublepost=1502050013,1502049869][/doublepost]
1: make sure you have to right addon and it's up to date.(skript as well. I use Bensku's fork dev 29)
2:make sure you've restarted your server
3: post the code containing your sound section as well.
1: Not using bensku's fork and I'm using the latest version of skRayFall
2: I have
3:
code_language.skript:
command /acautoban [<offlineplayer>] [<text>]:
    executable by: console
    trigger:
        if chance of 35%:
            wait 6 seconds
            loop all players:
                play raw sound "entity.lightning.impact" at loop-player with volume 10   
                broadcast "&7&m----------------------------------------------------------------"
                broadcast ""
                broadcast "&c%arg-1% &7was detected cheating and was removed from the network"
                broadcast ""
                broadcast "&7&m----------------------------------------------------------------"
                execute command "/ipban -s %arg-1% %arg text%"
                stop
        if chance of 45%:
            wait 8 seconds
            loop all players:
                play raw sound "entity.lightning.impact" at loop-player with volume 10   
                broadcast "&7&m----------------------------------------------------------------"
                broadcast ""
                broadcast "&c%arg-1% &7was detected cheating and was removed from the network"
                broadcast ""
                broadcast "&7&m----------------------------------------------------------------"
                execute command "/ipban -s %arg-1% %arg text%"
                stop
        if chance of 25%:
            wait 10 seconds
            loop all players:
                play raw sound "entity.lightning.impact" at loop-player with volume 10   
                broadcast "&7&m----------------------------------------------------------------"
                broadcast ""
                broadcast "&c%arg-1% &7was detected cheating and was removed from the network"
                broadcast ""
                broadcast "&7&m----------------------------------------------------------------"
                execute command "/ipban -s %arg-1% %arg text%"
                stop
        if chance of 15%:
            wait 12 seconds
            loop all players:
                play raw sound "entity.lightning.impact" at loop-player with volume 10   
                broadcast "&7&m----------------------------------------------------------------"
                broadcast ""
                broadcast "&c%arg-1% &7was detected cheating and was removed from the network"
                broadcast ""
                broadcast "&7&m----------------------------------------------------------------"
                execute command "/ipban -s %arg-1% %arg text%"
                stop
 
I am

Thanks for pointing out the obvious xd

I'm not
[doublepost=1502050013,1502049869][/doublepost]
1: Not using bensku's fork and I'm using the latest version of skRayFall
2: I have
3:
code_language.skript:
command /acautoban [<offlineplayer>] [<text>]:
    executable by: console
    trigger:
        if chance of 35%:
            wait 6 seconds
            loop all players:
                play raw sound "entity.lightning.impact" at loop-player with volume 10  
                broadcast "&7&m----------------------------------------------------------------"
                broadcast ""
                broadcast "&c%arg-1% &7was detected cheating and was removed from the network"
                broadcast ""
                broadcast "&7&m----------------------------------------------------------------"
                execute command "/ipban -s %arg-1% %arg text%"
                stop
        if chance of 45%:
            wait 8 seconds
            loop all players:
                play raw sound "entity.lightning.impact" at loop-player with volume 10  
                broadcast "&7&m----------------------------------------------------------------"
                broadcast ""
                broadcast "&c%arg-1% &7was detected cheating and was removed from the network"
                broadcast ""
                broadcast "&7&m----------------------------------------------------------------"
                execute command "/ipban -s %arg-1% %arg text%"
                stop
        if chance of 25%:
            wait 10 seconds
            loop all players:
                play raw sound "entity.lightning.impact" at loop-player with volume 10  
                broadcast "&7&m----------------------------------------------------------------"
                broadcast ""
                broadcast "&c%arg-1% &7was detected cheating and was removed from the network"
                broadcast ""
                broadcast "&7&m----------------------------------------------------------------"
                execute command "/ipban -s %arg-1% %arg text%"
                stop
        if chance of 15%:
            wait 12 seconds
            loop all players:
                play raw sound "entity.lightning.impact" at loop-player with volume 10  
                broadcast "&7&m----------------------------------------------------------------"
                broadcast ""
                broadcast "&c%arg-1% &7was detected cheating and was removed from the network"
                broadcast ""
                broadcast "&7&m----------------------------------------------------------------"
                execute command "/ipban -s %arg-1% %arg text%"
                stop
You're not using skrayfall sounds or format.
Sounds: https://hub.spigotmc.org/javadocs/spigot/
Reference for format:
10d07a7ba4.png
 
Status
Not open for further replies.