This file was automatically imported from the old garrysmod.org site. You can see other imported files on the reuploads page.

antiafk.zip

  • Reuploaded by:
  • Uploaded: 1 year ago
  • Updated: 1 year ago
  • Type: Re-upload
  • Downloads: 299 (1 last 7 days)
  • Views: 396 (4 last 7 days)
  • Size: 6.48 KB
  • Tags: re-upload
The way this script works is:
It takes the time you have set in the config (top lines of the .lua file) or if you used aafk_time to set your own in game... and every amount of seconds as defined it checks the players entity angle.. (this is basically where the mouse is pointed) and stores it into a variable for your specific client.
If it finds that you have not changed angles since the last time it checked, and you are not flagged as afk, it will flag you as afk.
If it finds that you have not moved since it last checked and you are already flagged as afk, it will kick you from the server (assuming you have kick enabled)
The default time is 150 seconds.. this allows for around 5-7 minutes of complete afk before being kicked.. depending on how soon after a check you stop moving.
Suggestions for a future version are welcome.. I will try to implement anything that seems worth implementing.
ChangeLog:
v1.0
-Release
v1.1
-Hooks and Timers are client side now, the client checks its own angles instead of the server checking every players angle
-Added in name change support. Whan a player goes afk, their name changes to Name and back when they return.
-Added functions to have the client and server side of the script communicate properly with each other.
v1.2
-went partially back to serverside. It was possible to use lua_run_cl to mess up the checks and circumvent the system. Now it is not =)
-Fixed other various bugs.
v1.3
-Fixed issues in 1.2 that were causing certain variables not to load on dedicated servers at runtime.
v2.0
-Major Release
-Added a new variable, aafk_kicknumber will set the server to only kick AFk clients if there are more clients connected to the server than you have the number set to. If there are fewer, it will not kick them.
-Added Names over afk players heads.
-Typing !afk will now flag yourself as afk. Not advised if kick is enabled for you =)
-Chatting as well as view angle will prevent being flagged as afk. Chatting will now bring you out of afk as well.
-Changed: In th

This download looks like an addon. You need to extract the downloaded zip and put the addon folder in your Garry's Mod addons folder. You should end up with a directory structure similar to below:

  • steamapps
    • common
      • garrysmod
        • garrysmod
          • addons
            • AntiAFK <-- Addon folder!
              • e.g.
              • lua
              • maps
              • materials
              • models
              • etc

Don't know where the Garry's Mod folder is or how to extract zip files? See more useful installation tips.

  • AntiAFK/
    • info.txt
    • lua/
      • ULib/
        • modules/
          • aafk.lua
    • README.txt

Billy Mayonaise the 2nd, nadineenidan, ✪ Ko1N, 93creeperkiller, [Lucas]|Bolrod|, TheGeniusKiller, VHS7 Trex Psycho M9, EpicGamer25, Porsche, [RG] Zeo, BigApple, Hexah, ☢freekillercy™ CAMPEOESSS, timmy, Nyan, [KX]Wookie953, ISN | Brutaly, T.w² | Alucard, iDrDiablooz, MrRoy, Danny Johnson, monkeyfish, Doge228, chiken, [RRP] Original, {*SG*} Jesus H. Christ, esquire, Dave, King Epic, Wienerbutt, {Fondateur}L-F WiiZavV [Nami], Arczi, Raven, Misgou, ewaldred, Berinkton, EagleEye247™ @MeowTenJew Servers, Chroma | GuiZi, wow wow whevesy, Sorch, モク | M็o็k็u็, Dr.Doge (Searching for pancakes), [email protected], [email protected], Shock, Eaglishee, Fire Skull Master, Tom, Igor Sokolnitcheskaia, Spooky Skeleton, Kaneki Ghoul +249 others

BBCode:

HTML:

Social: