1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved CPS command

Discussion in 'Skript' started by ShadowLifeMC, Jul 20, 2020.

Thread Status:
Not open for further replies.
  1. ShadowLifeMC

    ShadowLifeMC New Member

    Joined:
    Jul 20, 2020
    Messages:
    5
    Likes Received:
    0
    Hello!
    I urgently need a command skript for a pvp server.
    The command should be /cps <player> and it should tell me the clicks per second of the player listed.
    Thanks!
     
  2. couger44

    Supporter

    Joined:
    Feb 19, 2017
    Messages:
    714
    Likes Received:
    31
    Skript is not good at this kind of thing. But well, try something like this:
    Code (Skript):
    1. on join:
    2.     delete {counter.%player%}
    3. on left click:
    4.     add 1 to {counter.%player%}
    5.     if {counter.%player%} >= 10:
    6.         kick player due to "Reason to kick"
    7.     wait 1 seconds
    8.     subtract 1 from {counter.%player%}
    9. on quit:
    10.     delete {counter.%player%}
     
    #2 couger44, Jul 20, 2020
    Last edited: Jul 20, 2020
  3. ShadowLifeMC

    ShadowLifeMC New Member

    Joined:
    Jul 20, 2020
    Messages:
    5
    Likes Received:
    0
  4. Gowixx

    Gowixx Member

    Joined:
    Jul 9, 2020
    Messages:
    28
    Likes Received:
    6
    Code (Text):
    1. on join:
    2.     delete {cpscounter.%player%}
    3. on left click:
    4.     add 1 to {cpscounter.%player%}
    5.     if {cpscounter.%player%} >= 15:
    6.         kick player due to "High CPS"
    7.     wait 1 seconds
    8.     subtract 1 from {cpscounter.%player%}
    9. on quit:
    10.     delete {cpscounter.%player%}
    This is like the same, but I changed how @couger44 made the cps a low ammount. and made the variable cpscounter.%player% because you could be using counter.%player% already.
     
Thread Status:
Not open for further replies.

Share This Page

Loading...