#I want to add a cooldown to add a 2 minute and 30 second cooldown to each button/block in a GUI.
1 messages · Page 1 of 1 (latest)
clicked slot = 0
set {cooldown::%player%} to 150 seconds ago if {cooldown::%player%} isn't set
if difference between now and {cooldown::%player%} < 150 seconds:
stop
cancel event
set {cooldown::%player%} to now
# execute code```
it does not really seem to work for me
it says it cant understand this section: on inventory click
do /sk info and send it here
i just changed the position on the line and it worked
but im gonna check if there are any more errors
this is the sk info
So i read your tutorial on skripthub eult and i came up with this. I am really new with script so i just wanted to ask what is wrong, because there are some errors.
you forgot to set the cooldown
scroll to the event cooldown
damn my fault
on event:
set {_waited} to difference between {cooldown::%player's uuid%} and now
if {_waited} is less than 10 seconds:
send "Try again in %difference between 10 seconds and {_waited}%"
stop
else:
set {cooldown::%player's uuid%} to now
#do event here
so do event here is that the commands?
that's an event cooldown
for the command cooldown scroll up in the tutorial
ok
Now most of the errors have been removed but there is one left. I dont know what it means. Could you help me?
why the :
on?
send action bar