every 5 seconds

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

Kelvin Brahe

Member
Oct 3, 2019
1
0
0
24
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***
 
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
 
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***
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
Also, if you are looking for the permission "sk.tos" then the right format for the condition would be:
code_language.skript:
if loop-player has permission "sk.tos":
Don't surround it in curly brackets.
 
I haven't tested it but im sure this will work:

Code:
every 5 seconds:
    loop all players:
        if loop-player has the permission "sk.tos":
            execute loop-player command "/testtt"
[doublepost=1570310713,1570310601][/doublepost]Or if you have essentials installed on your server you can use this too:

Code:
every 5 seconds:
    loop all players:
        if loop-player has the permission "sk.tos":
            execute console command "sudo %loop-player% c:/testtt"
 
Status
Not open for further replies.