1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How do I do for an event if there are 6 players in a world

Discussion in 'Skript' started by ImJaviGamer, Oct 21, 2021.

  1. ImJaviGamer

    ImJaviGamer Member

    Joined:
    Jun 10, 2021
    Messages:
    4
    Likes Received:
    0
    I need to execute a command automatically when there are 6 connected in the Survival world
     
    #1 ImJaviGamer, Oct 21, 2021
    Last edited: Oct 21, 2021
  2. FlameikTV

    FlameikTV Member

    Joined:
    May 22, 2020
    Messages:
    19
    Likes Received:
    2
    Hey,
    in the title, you have that you want to execute that command if there are 6 players in that world, and in your message, you are saying you want to have 10 players in that world before executing that command - so I have made that code to work if there are 10 players in that world.

    So here you have the code for it:
    Code (Text):
    1. on world change:
    2.    if amount of all players in world “world” is 10:
    3.       make console execute command "say Hello!"
     
  3. ImJaviGamer

    ImJaviGamer Member

    Joined:
    Jun 10, 2021
    Messages:
    4
    Likes Received:
    0
    Perfect now my question is how can I do so that only the player who entered the world being player number 6 is only the one who executes the command and not those who entered first or after player 6
    --- Double Post Merged, Oct 22, 2021, Original Post Date: Oct 22, 2021 ---
    So as example 8 players enter a world
    They can't use any command
    But the 6th player that entered the world can
     

Share This Page

Loading...