Solved How to all player execute a command and saferestart

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

AKRODOGY

Active Member
Mar 20, 2018
52
2
8
24
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_language.skript:
on command "/saferestart":
    trigger:
        send "&e&l»» &fEsti sigur ca vrei sa faci asta?" to player
        send player title "&c&l▲ &fO restartare va fi in: &c&l▲" with subtitle "&c☠ &f&l5 minute" for 5 seconds
        wait 60 seconds
        send player title "&c&l▲ &fO restartare va fi in: &c&l▲" with subtitle "&c☠ &f&l4 minute" for 5 seconds
        wait 60 seconds
        send player title "&c&l▲ &fO restartare va fi in: &c&l▲" with subtitle "&c☠ &f&l3 minute" for 5 seconds
        wait 60 seconds
        send player title "&c&l▲ &fO restartare va fi in: &c&l▲" with subtitle "&c☠ &f&l2 minute" for 5 seconds
        wait 60 seconds
        send player title "&c&l▲ &fO restartare va fi in: &c&l▲" with subtitle "&c☠ &f&l1 minut" for 5 seconds
        wait 55 seconds
        send player title "&c☠ &fVei fi teleportat in Lobby &c☠" with subtitle "&f" for 2 seconds
        execute player's command "/hub"
        execute console command "/minecraft:stop"
 
Try this,

code_language.skript:
command /saferestart:
    trigger:
        send "&e&l»» &fEsti sigur ca vrei sa faci asta?" to player
        send player title "&c&l▲ &fO restartare va fi in: &c&l▲" with subtitle "&c☠ &f&l5 minute" for 5 seconds
        wait 60 seconds
        send player title "&c&l▲ &fO restartare va fi in: &c&l▲" with subtitle "&c☠ &f&l4 minute" for 5 seconds
        wait 60 seconds
        send player title "&c&l▲ &fO restartare va fi in: &c&l▲" with subtitle "&c☠ &f&l3 minute" for 5 seconds
        wait 60 seconds
        send player title "&c&l▲ &fO restartare va fi in: &c&l▲" with subtitle "&c☠ &f&l2 minute" for 5 seconds
        wait 60 seconds
        send player title "&c&l▲ &fO restartare va fi in: &c&l▲" with subtitle "&c☠ &f&l1 minut" for 5 seconds
        wait 55 seconds
        send player title "&c☠ &fVei fi teleportat in Lobby &c☠" with subtitle "&f" for 2 seconds
        loop all players:
            send bungeecord players to bungeecord server "hub"
            wait 2 ticks
            execute console command "/minecraft:stop"

You will need skungee for this.
 
code_language.skript:
command saferestart:
    trigger:
        send "&e&l»» &fEsti sigur ca vrei sa faci asta?" to player
        set {_minutes} to 5
        loop {_minutes}*60 times:
            wait a second
            add 1 to {_time}
            if {_time} = 60:
                set {_time} 0
                remove 1 from {_minutes}
                send player title "&c&l▲ &fO restartare va fi in: &c&l▲" with subtitle "&c☠ &f&l%{_minutes}% minute" for 5 seconds
            {_minutes} = 0   
            {_time} = 0
            send player title "&c☠ &fVei fi teleportat in Lobby &c☠" with subtitle "&f" for 2 seconds
        loop all players:
            make loop-player execute command "hub"
        make console execute command "minecraft:stop"

la faza cu "Esti sigur ca vrei sa faci asta" mai bine deschizi un meniu si selectezi DA/NU
 
code_language.skript:
command saferestart:
    trigger:
        send "&e&l»» &fEsti sigur ca vrei sa faci asta?" to player
        set {_minutes} to 5
        loop {_minutes}*60 times:
            wait a second
            add 1 to {_time}
            if {_time} = 60:
                set {_time} 0
                remove 1 from {_minutes}
                send player title "&c&l▲ &fO restartare va fi in: &c&l▲" with subtitle "&c☠ &f&l%{_minutes}% minute" for 5 seconds
            {_minutes} = 0  
            {_time} = 0
            send player title "&c☠ &fVei fi teleportat in Lobby &c☠" with subtitle "&f" for 2 seconds
        loop all players:
            make loop-player execute command "hub"
        make console execute command "minecraft:stop"

la faza cu "Esti sigur ca vrei sa faci asta" mai bine deschizi un meniu si selectezi DA/NU
Use /hub otherwise they'll say 'hub'
 
Status
Not open for further replies.