ULX

Author Topic: AAFK V_3.1 : Anti-AFK system for Garry's Mod  (Read 113321 times)

0 Members and 3 Guests are viewing this topic.

Offline syn.

  • Jr. Member
  • **
  • Posts: 56
  • Karma: 6
  • Lua Padawan
    • SynGaming
Re: AAFK V_3.1 : Anti-AFK system for Garry's Mod
« Reply #30 on: January 24, 2014, 06:10:15 PM »
Oh yeah! This is totally legit! I love syn! 
Code: [Select]
x = syn
if x == syn then
print (x .. " is so sexy!")
syn is so sexy!
that is totally kind (and legit) of you to say! xD
Lua Student

"The more you understand, the crazier you get."

Offline Bytewave

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 718
  • Karma: 116
  • :)
    • My Homepage
Re: AAFK V_3.1 : Anti-AFK system for Garry's Mod
« Reply #31 on: January 24, 2014, 06:12:51 PM »
that is totally kind (and legit) of you to say! xD
HOW DARE YOU CONTORT MY WORDS?
THOU SHALT BE SMITTEN BY MY AMAZING POWERS OF ZAP CRACKLE SNAP!
*pulls out a battery and two ominous looking wires and smiles evily*
bw81@ulysses-forums ~ % whoami
Homepage

Offline DRKO

  • Newbie
  • *
  • Posts: 1
  • Karma: -1
Re: AAFK V_3.1 : Anti-AFK system for Garry's Mod
« Reply #32 on: January 28, 2014, 01:35:37 PM »
Could someone tell me of this works for those players in spectate mode? I have the problem of people logging on in spectator mode to rack up points in the pointshop, and I don't really want that. People also sometimes go into spectator mode when the server is full, taking up spots, and it would be nice if we could auto kick them based on how long they were there.

Offline syn.

  • Jr. Member
  • **
  • Posts: 56
  • Karma: 6
  • Lua Padawan
    • SynGaming
Re: AAFK V_3.1 : Anti-AFK system for Garry's Mod
« Reply #33 on: January 28, 2014, 02:51:57 PM »

Could someone tell me of this works for those players in spectate mode? I have the problem of people logging on in spectator mode to rack up points in the pointshop, and I don't really want that. People also sometimes go into spectator mode when the server is full, taking up spots, and it would be nice if we could auto kick them based on how long they were there.
yep works for spectators and normal players, as long as they don't move it will kick them within the time specified.
Lua Student

"The more you understand, the crazier you get."

Offline chris8778

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Re: AAFK V_3.1 : Anti-AFK system for Garry's Mod
« Reply #34 on: February 15, 2014, 02:58:21 PM »
can someone tell me how to[ edit this script to move them to spectate instead of kicking them; when time is up?

Offline PAL-18

  • Full Member
  • ***
  • Posts: 142
  • Karma: 1
Re: AAFK V_3.1 : Anti-AFK system for Garry's Mod
« Reply #35 on: February 21, 2014, 01:00:53 AM »
How are your admins defined in ULX? This only ignores players who register on IsAdmin(). So this would be: superadmin, admin, and any other group that inherits admin.

I have custom group names (on purpose so map exploits wont give people admin), how do i fix it so that my admins dont get kicked?

EDIT: I tried changing the code to "if pl:IsAdmin(customgroup)"  and i added the custom group names to "settings\users.txt" and im still getting kicked.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: AAFK V_3.1 : Anti-AFK system for Garry's Mod
« Reply #36 on: February 21, 2014, 02:23:21 PM »
Pal, you can't add a group check to the "IsAdmin" function - it searches for a player being part of Gmod's default "admin" group, nothing else.
You might be able to switch/addpl:IsUserGroup("customgroup") instead, which DOES take a group name.

You're thinking on preventing admin by using non-custom group names MIGHT help with ULX/other admin mods, but, once Gmod sees a player as admin or superadmin, no matter the exploit, they're going to get access to basic server admin functions inherent in Gmod itself.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline PAL-18

  • Full Member
  • ***
  • Posts: 142
  • Karma: 1
Re: AAFK V_3.1 : Anti-AFK system for Garry's Mod
« Reply #37 on: February 22, 2014, 12:42:42 AM »
Pal, you can't add a group check to the "IsAdmin" function - it searches for a player being part of Gmod's default "admin" group, nothing else.
You might be able to switch/addpl:IsUserGroup("customgroup") instead, which DOES take a group name.


Awesome, that fixed it!  Thanks

Offline PAL-18

  • Full Member
  • ***
  • Posts: 142
  • Karma: 1
Re: AAFK V_3.1 : Anti-AFK system for Garry's Mod
« Reply #38 on: March 22, 2014, 06:05:39 PM »
This doesnt work with Murder gamemode, anyone else having this problem?

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: AAFK V_3.1 : Anti-AFK system for Garry's Mod
« Reply #39 on: March 22, 2014, 08:20:36 PM »
The three main things it detects for AFK are:

1. Player's exact location. (X,Y,Z) coordinates.
2. Player's Look angles.
3. If they've said anything in chat.

Are any of these things changed in Murder. For example, does the gamemode reset a player's position more frequently than the timer to see if they are AFK?

Offline Bytewave

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 718
  • Karma: 116
  • :)
    • My Homepage
Re: AAFK V_3.1 : Anti-AFK system for Garry's Mod
« Reply #40 on: March 23, 2014, 08:27:03 AM »
This doesnt work with Murder gamemode, anyone else having this problem?
Murder has its own AFK system, doesn't it?
bw81@ulysses-forums ~ % whoami
Homepage

Offline PAL-18

  • Full Member
  • ***
  • Posts: 142
  • Karma: 1
Re: AAFK V_3.1 : Anti-AFK system for Garry's Mod
« Reply #41 on: March 24, 2014, 11:45:44 AM »
Murder has its own AFK system, doesn't it?

It just moves them to spectator, it doesnt kick them from server.

I searched through the code for the line that controls if a player is afk (in murder) and i found this:

Quote
if !ply.HasMoved && !ply.Frozen && self.AFKMoveToSpec:GetBool() then

I'm not exactly sure how to implement it into the afk kicker though :S
« Last Edit: March 24, 2014, 11:47:16 AM by PAL-18 »

Offline chris8778

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Re: AAFK V_3.1 : Anti-AFK system for Garry's Mod
« Reply #42 on: April 15, 2014, 04:07:48 AM »
Hey mr president. I run a popular melonbomb server and people die to fast for this to work.  How do i disable the checking if they moved and it just checks to see if they have moved the mouse and kick them that way?  Please remember I am a complete noob.  thanks :)  If you  fix this problem I would love to donate to you if you have a link  :)

An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given