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

every 5 seconds

Discussion in 'Skript' started by Kelvin Brahe, Oct 3, 2019.

  1. Kelvin Brahe

    Kelvin Brahe Member

    Joined:
    Oct 3, 2019
    Messages:
    1
    Likes Received:
    0
    Hi, I wanted to make a simple skript that makes players with the perm "sk.tos" run the command "/testtt" every 5 seconds. Can any1 help me, please?

    ***CODE***
    every 5 seconds:
    if player has permission "{sk.tos}":
    make player execute command "/testtt"
    ***CODE***
     
  2. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    player = the player in the event, but there is no player in a periodical event.
    You need to loop thru all the players, and just loop-player in your effects/conditions
     
  3. AsuDev

    VIP

    Joined:
    Jan 27, 2017
    Messages:
    195
    Likes Received:
    18
    Also, if you are looking for the permission "sk.tos" then the right format for the condition would be:
    Code (Skript):
    1. if loop-player has permission "sk.tos":
    Don't surround it in curly brackets.
     
    • Agree Agree x 1
  4. GamingHard

    GamingHard Member

    Joined:
    Oct 5, 2019
    Messages:
    17
    Likes Received:
    0
    I haven't tested it but im sure this will work:

    Code (Text):
    1. every 5 seconds:
    2.     loop all players:
    3.         if loop-player has the permission "sk.tos":
    4.             execute loop-player command "/testtt"
    --- Double Post Merged, Oct 5, 2019, Original Post Date: Oct 5, 2019 ---
    Or if you have essentials installed on your server you can use this too:

    Code (Text):
    1. every 5 seconds:
    2.     loop all players:
    3.         if loop-player has the permission "sk.tos":
    4.             execute console command "sudo %loop-player% c:/testtt"
     
Loading...