number of players in specific gamemode

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

Stefqnutz

Active Member
Sep 23, 2019
67
1
8
19
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?
 
Code:
command /worldmode [<text>] [<player>]:
    trigger:
        player's world is "%arg-1%":
            if gamemode of arg-2 is survival:
                add player to {Survival::*}
                send "You have been added to survival" to arg-2

You can thank me later :emoji_smile:
 
Status
Not open for further replies.