Hello again, I've created a Countdown timer but I don't know how to stop it when I want, I want to do something like /timer stop so it stops. Here's my code so far:
also is there anyway to execute a command after countdown has ended?
Code:
command /timer [<text>] <integer>:
trigger:
if arg-1 is "start":
set {_countdown} to arg 2
wait 1 tick
broadcast "&eCountdonw: &7%{_countdown}%"
loop arg 2 times:
remove 1 from {_countdown}
wait 1 second
broadcast "&eCountdonw: &7%{_countdown}%"
if arg-1 is "stop"
cancel event ???
also is there anyway to execute a command after countdown has ended?