Garry's Mod

Garry's Mod

评价数不足
Anti-AFK 4.0
   
奖励
收藏
已收藏
取消收藏
素材类型: 插件
插件类型: 服务器内容
插件标签: 角色扮演, 写实
文件大小
发表于
1.953 KB
2018 年 2 月 16 日 下午 2:34
1 项改动说明 ( 查看 )

订阅以下载
Anti-AFK 4.0

描述
Anti-AFK Version 4.0

Description:
This script monitors a players movements and actions on a server to attempt to determine if they are AFK. If they are found to be AFK it will tag them as such (client-side graphical).
Optionally (enabled by default) you can have the script kick players who have been afk for a certain number of minutes.

Installation Instructions:
Subscribe to the addon on the Steam Workshop. Once you've started your server, you can modify the default settings through your server console. See ConVars below.
http://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=1303583411

Console Variables:
aafk_enabled - ( Default: 1 ) - Is AAFK enabled? (0 - No, 1 - Yes)
aafk_flagminutes - ( Default: 5 ) - How long (in minutes) the player needs to be away before being flagged as AFK
aafk_kickminutes - ( Default: 10 ) - How long (in minutes) the player needs to be away before being kicked (if kicking is enabled).
aafk_ignoreadmins - ( Default: 0 ) - Should AAFK ignore admins? (0 - No, 1 - Yes)
aafk_kickenabled - ( Default: 1 ) - Should AAFK kick players who have remained AFK? (0 - No, 1 - Yes)
aafk_kickonlywhenfull - ( Default: 0 ) - If kicking is enabled, should AAFK only kick players when the server is full? (0 - No, 1 - Yes)
aafk_displayafkinchat - ( Default: 1 ) - Should it be announced to chat when a player goes AFK or returns from AFK? (0 - No, 1 - Yes)

Further Configuration:
If you are running ULX, you can give players or groups the ability to be ignored by the system. This also requires for aafk_ignoreadmins to be set to 1.

ulx groupallow [group] aafk_immunity
ulx userallow [user] aafk_immunity


Questions or Comments? Please comment!
11 条留言
Setnour6 2 月 15 日 上午 8:42 
I made a modification of this Anti-AFK system. Is it okay if I put it on the workshop while giving credit?
Psychotrickser 2022 年 12 月 16 日 上午 6:34 
Works perfectly fine. Thank you so much!
stevensky 2021 年 4 月 21 日 下午 11:49 
great work
ペクスイー シュ『Pekusuii | Shu』 2020 年 3 月 12 日 上午 4:50 
I wonder if you can add a hook to when people get AFK they die. Like for an optional command since mostly of the people don't use that...
Flo 2020 年 2 月 20 日 上午 5:13 
Hello,
can you add a concommand check?

example:
https://pastebin.com/bQVwB3dZ
Riker 2019 年 9 月 15 日 下午 4:29 
Wicked! Thanks :)
Mr.P  [作者] 2019 年 9 月 15 日 下午 12:34 
I don't know. That would be something they would have to enable on their end since they're giving the XP. If they are checking for the AFK flag then it should work.
Riker 2019 年 9 月 15 日 上午 4:18 
does this work with vrondakis's Levelling system? I'm looking for something to stop giving players XP when they go AFK? This addon is marked as "compatible" so I was wondering if it worked for what I'm looking for??
Mr.P  [作者] 2019 年 7 月 18 日 下午 5:30 
you can put those in server console. They should save between sessions, but if they don't, you can add them to your garrysmod/cfg/server.cfg file and they'll load every time the server starts.
Mr.P  [作者] 2019 年 4 月 25 日 下午 5:35 
Not tested in TTT, but it should, unless TTT overrides things that would break the detection.