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.

Solved loop players

Discussion in 'Skript' started by xCoini, May 1, 2019.

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

    xCoini Member

    Joined:
    Apr 19, 2019
    Messages:
    14
    Likes Received:
    0
    Yes I know, there must be an item-type but I do not know how else to do it:

    Code (Text):
    1. every second:
    2.     loop all players:
    3.         if %loop-player% has permission "system.mod":
    4.             set {Mod.%player%} to true
     
  2. novastosha

    novastosha Well-Known Member

    Joined:
    Jan 11, 2019
    Messages:
    344
    Likes Received:
    22
    Don't use: %loop-player% you're not in a text, Use: loop-player (With out "%").
     
  3. couger44

    Supporter

    Joined:
    Feb 19, 2017
    Messages:
    714
    Likes Received:
    31
    As said @novastosha . The percentages are only used in texts or things like that, if it is not a text, do not put percentages. Besides, you were wrong in the last line.

    Code (Skript):
    1.  
    2. every second:
    3.     loop all players:
    4.         if loop-player has permission "system.mod":
    5.             set {Mod.%loop-player%} to true
    6.  
    In your code you wrote {Mod.%player%}, when that variable was inside a loop.

    Finally, if you are going to use percentages, make sure you write the quotes before:
    Code (Skript):
    1.  
    2. #with quotes
    3. every second:
    4.     loop all players:
    5.         if "%loop-player%" has permission "system.mod":
    6.             set {Mod.%loop-player%} to true
    7.  
    8. #without quotes
    9. every second:
    10.     loop all players:
    11.         if loop-player has permission "system.mod":
    12.             set {Mod.%loop-player%} to true
     
  4. novastosha

    novastosha Well-Known Member

    Joined:
    Jan 11, 2019
    Messages:
    344
    Likes Received:
    22
    I am stupid, i didin't see that his used %player% while looping all players
     
    • Friendly Friendly x 1
  5. couger44

    Supporter

    Joined:
    Feb 19, 2017
    Messages:
    714
    Likes Received:
    31
    np :emoji_slight_smile:
     
Thread Status:
Not open for further replies.

Share This Page

Loading...