1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Add cooldown to a command

Discussion in 'Plugin Help' started by Willoxey, Apr 7, 2020.

  1. Willoxey

    Willoxey Spider Jockey

    Messages:
    33
    Hi there! i'm trying to make a Parkour-reward plugin for my own server.
    But the problem is that i cant figure out how i can add cooldown to a command(when the player finishes the first round he can click an Slapper and the slapper will execute the command)
    And i want the command to have a cooldown, so players cant abuse
    Thanks!
     
  2. NTT

    NTT Zombie

    Messages:
    311
    GitHub:
    NTT1906
    Go to YouTube and search "I'm Sonsa Cooldown", have a look at the guide and it will help u some
     
    Willoxey, myval2 and ethaniccc like this.
  3. HimbeersaftLP

    HimbeersaftLP Fish

    Messages:
    2,402
    GitHub:
    HimbeersaftLP
    To save other people a click:
     
    ethaniccc and Willoxey like this.
  4. NTT

    NTT Zombie

    Messages:
    311
    GitHub:
    NTT1906
    Thanks dude ^^
     
    Willoxey likes this.
  5. Willoxey

    Willoxey Spider Jockey

    Messages:
    33
    Thanks guys!
     
    xSoapers and HimbeersaftLP like this.
  6. Willoxey

    Willoxey Spider Jockey

    Messages:
    33
    Is there any way that i could save the array data and the time left in a config file?
    Because everytime server reebots the arrays just "dissapear" and they can claim it again
     
  7. HimbeersaftLP

    HimbeersaftLP Fish

    Messages:
    2,402
    GitHub:
    HimbeersaftLP
    yes
    This might help you: https://forums.pmmp.io/threads/using-configs.1975/
     
    Willoxey likes this.
  8. Willoxey

    Willoxey Spider Jockey

    Messages:
    33
    But he isnt talking about arrays :(. I already know how to save another type of config, but not the time and the player data in config.
    As i said, i'm using Sonsa's method to check if player has claimed or not his perk.
     
  9. Willoxey

    Willoxey Spider Jockey

    Messages:
    33
  10. HimbeersaftLP

    HimbeersaftLP Fish

    Messages:
    2,402
    GitHub:
    HimbeersaftLP
    I haven't got a single clue what you're talking about, but I have one piece of advice: You should know the basics of programming and php before writing plugins.
     
    Primus likes this.
  11. DragKills

    DragKills Creeper

    Messages:
    2
    GitHub:
    HixX
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.