#Timer and more
1 messages · Page 1 of 1 (latest)
I dont have the link
Google it
Just set a var to now and then on right click check if the difference is longer than the cooldown
Just use this
Look at the messages i sent earlier. There is a tutorial for this exact thing with examples
Its on github. Im in a car omw to vacation, i cant really find it as i rarely have reception rn. If you cant find it someone can send it to you
you can do a on join while player is online loop: on join: while player is online: if {yourVar::%player%} >= 0: remove 1 from {yourVar::%player%} wait 1 second
wait {_cooldown} seconds
if difference between {cooldown::%{_p}’s uuid%::%{_name}%} and now >= {_cooldown}:
delete {cooldown::%{_p}’s uuid%::%{_name}%}```
Then just check if the cooldown is set when they use the item. If it is, dont let them use it
You could make it a function, then use it for any item, or even combat log
Dont just copy and paste things
Use your brain.
You need to input a duration as well
Or 10min
Either
Could also use ticks or days or years
As long as its the same
No
Change it back to {_cooldown
You need to add a parameter
Next to the functions name
Add cooldown as a timespan
player: player, duration: timespan, name: string
why are you coding at 4am
The “can’t understand condition/effect” is from copy-pasting the apostrophe from discord. Retype it. Just wait {_duration}, no seconds, you have to specify seconds or minutes when you call the function
Change the parameters name from value to name
And change the “value” in the variable to “cooldown”
Pffft
Toby did that all send at once for you?
no. once each line
But like in rapid succession?
yep
I just got into an area with service again lol
nice
Oh, nvm
4 for me now
Well ima go to sleep, hopefully you can figure this out cause idk how long ima be out for