Solved Timer

  • 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.
code_language.skript:
command /cake:
    description: Recieve a cake, but you can only do this once per minute!
    permission: cake.is_a_lie
    executable by: players
    trigger:
        # stores how long it's been since the player last used this command
        set {_waited} to difference between {cake.%player%.lastused} and now
        # checks whether the player has used the command within the last minute
        if {_waited} is less than a minute:
            message "You have to wait %difference between a minute and {_waited}% before you can use this command again!"
            stop
        
        # some condition which sould not start the cooldown
        # (if the player doesn't get the cake he should be able to use the command again immediately)
        player doesn't have space for a cake:
            message "You do not have enough space in your inventory to hold the cake!"
            stop
            
        # do the action of the command
        give a cake to the player
        
        # and finally start the cooldown
        set {cake.%player%.lastused} to now

Something similar to this? (Not mine, default skript)
 
well its only giving me second i want like it to say, "you have to wait 1 m 30 s" something like that

with other words, i want to make a countdown like 10 minute 2 second left
 
Last edited:
code_language.skript:
 message "You have to wait %difference between a minute {_waited}% before you can use this command again!"
Just got to remove it
 
Status
Not open for further replies.