Stopping a command skript

  • 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 community!

    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.

Gotsly

Member
Aug 12, 2019
1
0
0
So I'm creating a timed restart skript so when I do /tdr or /timedrestart in-game, the server will initiate a countdown which concludes in the server restarting. Now I also want to implement a cancel command to cancel the whole operation before the server restarts. I don't know how to do it and I've tried many different things.

command /timedrestart [<text>]:
aliases: tdr
permission: ai.timedrestart
permission message: &cYou are not permitted to use this command.
trigger:
If argument 1 is not set:
send "&8[&3&lA&b&lI&8] &cAtrium will be doing an emergency restart in &430&c seconds!"
wait 15 seconds
send "&8[&3&lA&b&lI&8] &cAtrium will restart in &415&c seconds!"
wait 5 seconds
send "&8[&3&lA&b&lI&8] &cAtrium will restart in &410&c seconds!"
wait 5 seconds
send "&8[&3&lA&b&lI&8] &cAtrium will restart in &45&c seconds!"
wait 5 seconds
send "&8[&3&lA&b&lI&8] &4&LSERVER RESTARTING!"
wait 1 second
execute console command "restart"

I've tried things like:

If argument 1 is "cancel":
cancel event

and among others. Anyone know how to do this properly? (Also the indentations aren't showing up for some reason but they're there)


 
Status
Not open for further replies.