Solved Messaging all the players in a world

  • 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.

JackyBoy

Member
Feb 4, 2017
104
1
18
21
Hey there! I am unsure of the skript that I should be using to send messages to players that are in a different world, the world name is "Games" can someone please help me, thanks :emoji_slight_smile: (I do not have any other skript plugins but I am open to download any of them that I need for this)
 
If you want to send a message to all players in a single world, you can use:
code_language.skript:
broadcast "Whoa, this is a broadcast." to "Games"
# Send a message to all player's in the world "Games"

loop all players:
    if "%loop-player's world%" is "Games":
        send "Whoa, this is a message." to loop-player
# Send a message to each individual player in the world "Games"
Both of those methods work. However, I don't know about the current state of the world expression for the broadcast event, which is why I provided the second option.
 
  • Like
Reactions: DampfWaffel
Please search on the docs before ask questions like this:
http://skunity.com/effects?filter=Skript#Broadcast
http://skunity.com/effects?filter=Skript#Message
http://skunity.com/expressions?filter=Skript#Entities

Examples of what you're trying to do:
code_language.skript:
broadcast "hi" in world("world")

send "hi" to all players in world("world")

@mathhulk the message effect support multiple players, you don't need to do a loop for it, but in the case that you want to do the loop, I would recommend to use the where filter of skQ:
code_language.skript:
loop players where [player input is in world("world")]:
      send "hi" to loop-player
 
Last edited by a moderator:
Status
Not open for further replies.