Solved Online players execute player command

  • 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.
Jan 2, 2022
1
0
1
34
hey, I wanted to make a skript that if, for example, there have to be at least 5 people online before a command is executed only I don't know what I'm doing wrong!

If %online_players% 5:
make player execute command "/crate key all food 1"
 
Code:
every 2 seconds:
    {online::online}
    if {online::online} is greater than 4:
        make player/console execute command "/#command"
this makes it so every 2 seconds, if the server has more than 4 players, it executes the following command

PS: your gonna need to choose between player or console so make sure to delete the /
example;
make console execute command “/”
or
make player execute command “/”
 
Last edited:
Status
Not open for further replies.