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 How to all player execute a command and saferestart

Discussion in 'Skript' started by AKRODOGY, Aug 18, 2018.

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

    AKRODOGY Active Member

    Joined:
    Mar 20, 2018
    Messages:
    52
    Likes Received:
    2
    Hi there,

    1.I'm making a saferestart and don't know how to execute all player a command.
    2. At saferestart how can i do a sure word? ex: i'm execute /saferestart and it says in chat "Are you sure to do this?" And when i type yes to execute the skript below and when i type no to cancel it.

    Skript »
    Code (Skript):
    1. on command "/saferestart":
    2.     trigger:
    3.         send "&e&l»» &fEsti sigur ca vrei sa faci asta?" to player
    4.         send player title "&c&l▲ &fO restartare va fi in: &c&l▲" with subtitle "&c&f&l5 minute" for 5 seconds
    5.         wait 60 seconds
    6.         send player title "&c&l▲ &fO restartare va fi in: &c&l▲" with subtitle "&c&f&l4 minute" for 5 seconds
    7.         wait 60 seconds
    8.         send player title "&c&l▲ &fO restartare va fi in: &c&l▲" with subtitle "&c&f&l3 minute" for 5 seconds
    9.         wait 60 seconds
    10.         send player title "&c&l▲ &fO restartare va fi in: &c&l▲" with subtitle "&c&f&l2 minute" for 5 seconds
    11.         wait 60 seconds
    12.         send player title "&c&l▲ &fO restartare va fi in: &c&l▲" with subtitle "&c&f&l1 minut" for 5 seconds
    13.         wait 55 seconds
    14.         send player title "&c&fVei fi teleportat in Lobby &c☠" with subtitle "&f" for 2 seconds
    15.         execute player's command "/hub"
    16.         execute console command "/minecraft:stop"


     
  2. Best Answer:
    Post #3 by Uzumaki, Aug 18, 2018
  3. Dabriel

    Dabriel Member

    Joined:
    Aug 13, 2018
    Messages:
    45
    Likes Received:
    5
    Try this,

    Code (Skript):
    1. command /saferestart:
    2.     trigger:
    3.         send "&e&l»» &fEsti sigur ca vrei sa faci asta?" to player
    4.         send player title "&c&l▲ &fO restartare va fi in: &c&l▲" with subtitle "&c&f&l5 minute" for 5 seconds
    5.         wait 60 seconds
    6.         send player title "&c&l▲ &fO restartare va fi in: &c&l▲" with subtitle "&c&f&l4 minute" for 5 seconds
    7.         wait 60 seconds
    8.         send player title "&c&l▲ &fO restartare va fi in: &c&l▲" with subtitle "&c&f&l3 minute" for 5 seconds
    9.         wait 60 seconds
    10.         send player title "&c&l▲ &fO restartare va fi in: &c&l▲" with subtitle "&c&f&l2 minute" for 5 seconds
    11.         wait 60 seconds
    12.         send player title "&c&l▲ &fO restartare va fi in: &c&l▲" with subtitle "&c&f&l1 minut" for 5 seconds
    13.         wait 55 seconds
    14.         send player title "&c&fVei fi teleportat in Lobby &c☠" with subtitle "&f" for 2 seconds
    15.         loop all players:
    16.             send bungeecord players to bungeecord server "hub"
    17.             wait 2 ticks
    18.             execute console command "/minecraft:stop"
    You will need skungee for this.
     
  4. Uzumaki

    Uzumaki Well-Known Member

    Joined:
    Feb 20, 2017
    Messages:
    310
    Likes Received:
    10
    Code (Skript):
    1. command saferestart:
    2.     trigger:
    3.         send "&e&l»» &fEsti sigur ca vrei sa faci asta?" to player
    4.         set {_minutes} to 5
    5.         loop {_minutes}*60 times:
    6.             wait a second
    7.             add 1 to {_time}
    8.             if {_time} = 60:
    9.                 set {_time} 0
    10.                 remove 1 from {_minutes}
    11.                 send player title "&c&l▲ &fO restartare va fi in: &c&l▲" with subtitle "&c&f&l%{_minutes}% minute" for 5 seconds
    12.             {_minutes} = 0  
    13.             {_time} = 0
    14.             send player title "&c&fVei fi teleportat in Lobby &c☠" with subtitle "&f" for 2 seconds
    15.         loop all players:
    16.             make loop-player execute command "hub"
    17.         make console execute command "minecraft:stop"
    18.        
    19.        
    20.        
    la faza cu "Esti sigur ca vrei sa faci asta" mai bine deschizi un meniu si selectezi DA/NU
     
  5. Efnilite

    Supporter

    Joined:
    May 12, 2018
    Messages:
    218
    Likes Received:
    15
    Medals:
    Use /hub otherwise they'll say 'hub'
     
  6. Uzumaki

    Uzumaki Well-Known Member

    Joined:
    Feb 20, 2017
    Messages:
    310
    Likes Received:
    10
    no they will not
     
  7. AKRODOGY

    AKRODOGY Active Member

    Joined:
    Mar 20, 2018
    Messages:
    52
    Likes Received:
    2
    Mersi Uzumaki :emoji_slight_smile:
     
Thread Status:
Not open for further replies.

Share This Page

Loading...