so i have a skript that has a command that sets a time variable to a int, and everysecond if an other variable is true, it adds 1 to a timepast variable, and if the timepast varible is more or equal to the time variable it should kick all players and after 2 seconds shutdown the server, i put the skript on my server i dont get any errors while reloading the skript, but it isnt working. here is the skript.
PS: Ignore the german messages.
code_language.skript:
every 1 second:
if {timeset} is true:
add 1 to {timepast}
if {timepast} is more than or equal to {timeleft.left}:
loop all players:
kick the loop-player
wait 2 seconds
execute console command "/stop"
command /timeleft [<int>]:
trigger:
if player does not have permission "timeleft.left":
message "{@prefix} &4Keine Rechte!"
stop
else:
if {timeset} is "false" or not set:
set {timeleft.left} to arg
set {timeset} to true
message "{@prefix} &bDie Zeit Wurde auf &c%arg% &bGesetzt!"
stop
PS: Ignore the german messages.