every 1 seconds:
loop all players:
if loop-player is in region "TNTRUN":
if block below loop-player is TNT:
# Sprawdzenie, czy upłynął cooldown
if {tnt.cooldown.%loop-player's uuid%} is not set:
set block below loop-player to air
send "&cTNT pod tobą zostało usunięte!" to loop-player
set {tnt.cooldown.%loop-player's uuid%} to 1 second
if {tnt.cooldown.%loop-player's uuid%} < 1 second:
set block below loop-player to air
send "&cTNT pod tobą zostało usunięte!" to loop-player
set {tnt.cooldown.%loop-player's uuid%} to 1 second
to naprawia błąd ale i tak nie działa... jeśli chcesz cooldown musisz określić początek odliczania cooldownu
GOTOWY KOD:
every 1 seconds:
loop all players:
if loop-player is in region "TNTRUN":
if block below loop-player is TNT:
# Sprawdzenie, czy upłynął cooldown
if {tnt.cooldown.%loop-player's uuid%} is not set:
set {tnt.cooldown.%loop-player's uuid%} to now
set block below loop-player to air
send "&cTNT pod tobą zostało usunięte!" to loop-player
if difference between {tnt.cooldown.%loop-player's uuid%} and now > 1 second:
set block below loop-player to air
send "&cTNT pod tobą zostało usunięte!" to loop-player
set {tnt.cooldown.%loop-player's uuid%} to now