Cooldown

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

tjunQle

Member
Mar 14, 2020
1
0
1
23
Hi, i was wondering if any1 knows how to round up a cooldown timer? For example if i try to take my kit, and its on cooldown it'll say "2 minutes, and 49.49420 seconds left" but i wanna make it say "2 minutes, and 49 seconds left"

this is my code:
upload_2020-3-14_19-40-38.png
 
just before you are showing the variable to the player:
Code:
set {yourvariable} to round({yourvariable})
 
just before you are showing the variable to the player:
Code:
set {yourvariable} to round({yourvariable})

wont work bc its a time and not a number
[doublepost=1584358091,1584357999][/doublepost]
Hi, i was wondering if any1 knows how to round up a cooldown timer? For example if i try to take my kit, and its on cooldown it'll say "2 minutes, and 49.49420 seconds left" but i wanna make it say "2 minutes, and 49 seconds left"

this is my code:View attachment 4378

u can also just use the cooldowns of skript itself:


Code:
command /home:
    cooldown: 10 seconds
    cooldown message: You last teleported home %elapsed time% ago, you may teleport home again in %remaining time%.
    trigger:
        teleport player to {home::%player%}
 
Status
Not open for further replies.