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

TechyGaming

Member
Sep 22, 2019
3
0
0
23
Hi,
I am trying to create a script that send a message to players with the permission techcraft.worldchange.notify but after reading the Skript documentation and experimenting for hours I can't. Here's my current code:

Code:
command /world <text>:
  permission: techcraft.world
  permission message: &cYou do not have permission to do this.
  usage: /world <World Name>
  trigger:
    if arg 1 is set:
      teleport the player to {world.%arg 1%}
      message "&aAttempting to send you to %arg 1%..."
      loop all players:
        if loop-player has permission "techcraft.worldchange.notify":
          wait 5 ticks
          message "&7&o[&r&e%player%:&7&o connected to %world%...]"
        else:
          stop


:: Below is just for variable context ::
Code:
command /addworldspawn <text>:
  permission: techcraft.worldspawn.create
  permission message: &cYou do not have permission to do this.
  trigger:
    if arg 1 is set:
      set {world.%arg 1%} to location of block at location of player
      message "&aSucessfully created world spawn &2%arg 1%&a."
    else:
      message "&cInvalid Command Usage."
 
Hi,
I am trying to create a script that send a message to players with the permission techcraft.worldchange.notify but after reading the Skript documentation and experimenting for hours I can't. Here's my current code:

Code:
command /world <text>:
  permission: techcraft.world
  permission message: &cYou do not have permission to do this.
  usage: /world <World Name>
  trigger:
    if arg 1 is set:
      teleport the player to {world.%arg 1%}
      message "&aAttempting to send you to %arg 1%..."
      loop all players:
        if loop-player has permission "techcraft.worldchange.notify":
          wait 5 ticks
          message "&7&o[&r&e%player%:&7&o connected to %world%...]"
        else:
          stop


:: Below is just for variable context ::
Code:
command /addworldspawn <text>:
  permission: techcraft.worldspawn.create
  permission message: &cYou do not have permission to do this.
  trigger:
    if arg 1 is set:
      set {world.%arg 1%} to location of block at location of player
      message "&aSucessfully created world spawn &2%arg 1%&a."
    else:
      message "&cInvalid Command Usage."
I think you missed something

code_language.skript:
command /world <text>:
  permission: techcraft.world
  permission message: &cYou do not have permission to do this.
  usage: /world <World Name>
  trigger:
    if arg 1 is set:
      teleport the player to {world.%arg 1%}
      message "&aAttempting to send you to %arg 1%..."
      loop all players:
        if loop-player has permission "techcraft.worldchange.notify":
          wait 5 ticks
          message "&7&o[&r&e%player%:&7&o connected to %world%...]" to loop-player
        else:
          stop
[doublepost=1577735199,1577735161][/doublepost]The "to loop-player" at 13th line
 
Status
Not open for further replies.