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.

number of players in specific gamemode

Discussion in 'Skript' started by Stefqnutz, Nov 17, 2022.

Thread Status:
Not open for further replies.
  1. Stefqnutz

    Stefqnutz Active Member

    Joined:
    Sep 23, 2019
    Messages:
    67
    Likes Received:
    1
    ik it sounds simple but i wanna make it so that it basically checks the gamemode of the amount of all players on the server in a specific world
    i tried using "number of players in world x" and while it works, i cant check the for the gamemode
    loops are also not gonna work since if i do this:
    loop all players:
    if loop-player's gamemode is spectator:
    if loop-player is in world "world":
    add 1 to {spectators}

    it will constantly increment the value.
    so what can i do?
     
  2. iFammYT

    iFammYT Member

    Joined:
    Nov 6, 2022
    Messages:
    13
    Likes Received:
    1
    Code (Text):
    1. command /worldmode [<text>] [<player>]:
    2.     trigger:
    3.         player's world is "%arg-1%":
    4.             if gamemode of arg-2 is survival:
    5.                 add player to {Survival::*}
    6.                 send "You have been added to survival" to arg-2
    You can thank me later :emoji_smile:
     
Thread Status:
Not open for further replies.

Share This Page

Loading...