Jump to content
Killer5a

[UNIVERSAL] Anti-Autoclicker

Recommended Posts

This is a simple anti autoclicker i made for Project Silverlake.
There isn't really much to it, and very easy to add to your mission.

How it works, it counts up your clicks and removes each click from the variable after 1 second.
Once the first click gets removed, it will run the if statement and its up to you what it does from there.
I set it up to just log it as seen below.
 

ClicksPerSecond = 0; //Sets a value to the variable
lastlogging = 0; //Sets value to the last logging
clickingstarted = false; // Default value

(findDisplay 46) displayAddEventHandler ["MouseButtonDown",{
_this spawn {
ClicksPerSecond = ClicksPerSecond + 1; clickingstarted = true; //Ups the clicks per second
if(ClicksPerSecond < 0) then {ClicksPerSecond = 0;}; //Just to make sure the value doesn't go below 0
hint format["Clicks per second: %1",ClicksPerSecond]; //Just a hint to demonstrate that it catches your clicks per second
uisleep 1; ClicksPerSecond = ClicksPerSecond - 1; // Reduces value after 1 second (helps getting clicks per second)
if(ClicksPerSecond >= 20 && clickingstarted) then { //If clicks per second is equal or above 20 it runs this
  clickingstarted = false;
  hint format["AutoClicker Detected (%1 c/s)",ClicksPerSecond];
  if((lastLogging + 20) < time) then { // if its been 20 seconds since last time it logged it, it will log it again
    lastLogging = time;  // resets the time before it logs it again
    systemChat "Logged the autoclicker.."; //Replace this with a logging function or auto kick/ban
  };
};
if(ClicksPerSecond < 0) then {ClicksPerSecond = 0;}; //Just to make sure the value doesn't go below 0
}}];

GIF of how it works: https://i.gyazo.com/62f985e52bcb11eb6f1f0be5c90aefae.mp4

How to use it for your server:
You just need to execute it on the player when he joins, so drop it in the initplayerlocal and your good to go!

Now you have a simple anti-autoclicker. 
Made by King / Killer5a

Edited by Killer5a
  • Like 5

Share this post


Link to post
Share on other sites

Note: This does not stop people from rebinding their default action. To counter that. You can just use the same script but add it to the event handler for KeyDown or KeyUp

Edited by Killer5a

Share this post


Link to post
Share on other sites
28 minutes ago, Stich۞ said:

So if i want to use this on Alits 5.0, does the admin recive a msg, when autoclicker is detected?

This is pretty much a template, you would have to do that yourself, but shouldn't be too hard

Share this post


Link to post
Share on other sites

When following the instructions on where to put it in the first post nothing happen.

When following Repentz advise the client doesn't get initialized correct and spawns at the spawn marker without loadout.

 

EDIT: Got it to work know. Just wondering how I can get the name of the player that got detected...

Edited by Dunkstormen

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×