Solved AutoClicker check problem

  • 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.
D

Deleted member 6377

Skript Version: 2.1.2
Minecraft Version: 1.8.9

---
Full Code:
code_language.skript:
# AntiAutoClicker by D0XY. https://www.youtube.com/c/d0xyyt


options:

# Change the number after "clickmax" to set what CPS the player gets kicked at!


    clickmax: 5

# DO NOT CHANGE ANYTHING BELOW THIS LINE!!!

    prefix: &6[&eAntiAutoClick&6]&r



command /autoclickcheck [<Text>]:
    permission: autoclickcheck.use
    permission message :&cNo permission!
    trigger:
        if arg 1 is not set:
            message "{@prefix} &cUsage: /autoclickcheck (true/false)"
        if arg 1 is "true":
            loop all players:
                set {clickcheck.%loop-player%} to true
            message "{@prefix} &aAutoClicker check enabled."
        if arg 1 is "false":
            loop all players:
                set {clickcheck.%loop-player%} to false
            message "{@prefix} &cAutoClicker check disabled."

on join:
        clear {clicks.%player%}

on left click:
        {clickcheck} is true
        add 1 to {clicks.%player%}
        {clicks.%player%} > {@clickmax}
        kick the player due to "&d%{clicks.%player%}%&c+ CPS, AutoClicker?"
        broadcast "&d%player%&b has been kicked for clicking &d%{clicks.%player%}%&b+ CPS!"

every 5 seconds:
        set {clickcheck} to true
        wait 0.5 second
        set {clickcheck} to false
        loop all players:       
                delete {clicks.%loop-player%}

Errors on reload:
No errors on reload.

Problem:

When I enable the AutoClicker check (/autoclickercheck true), it only enabled the check for the player that wrote the command. Of course, I don't want that so I try to fix it using the LoopPlayer thing but now it just sends me the message that it Enabled but the click check doesn't work anymore, I don't get kicked



Have you tried searching the docs?
Yes
Have you tried searching the forums?
No
What other methods have you tried to fix it?
None, don't know any other method.
 
code_language.skript:
command /autoclickcheck [<Text>]:
    permission: autoclickcheck.use
    permission message :&cNo permission!
    trigger:
        if arg 1 is not set:
            message "{@prefix} &cUsage: /autoclickcheck (true/false)"
        if arg 1 is "true":
            set {clickcheck.enabled} to true
            message "{@prefix} &aAutoClicker check enabled."
        if arg 1 is "false":
            set {clickcheck.enabled} to false
            message "{@prefix} &cAutoClicker check disabled."
          
every 1 seconds:
    if {clickcheck.enabled} is true:
        loop all players:
            if {clicks.%loop-player%} is more than {@clickmax}:
                kick the loop-player due to "&d%{clicks.%loop-player%}%&c CPS, AutoClicker?"
                broadcast "&d%loop-player%&b has been kicked for clicking &d%{clicks.%loop-player%}%&b CPS!"
            delete {clicks.%loop-player%}
      
      
on click:
    if {clickcheck.enabled} is true:
         add 1 to {clicks.%player%}
  
on quit:
    wait 1 tick
    delete {clicks.%player%}
[doublepost=1526551881,1526550756][/doublepost]And... i would change max click rate to higher value because i can click over 10 cps...
upload_2018-5-17_12-11-6.png
 
Status
Not open for further replies.