Hello there! I’m new to lua pretty much. I wanted to start making more helpful tools for gmod.
My last tool wasn’t too well received, probably because it was poorly thought out.
I made sure not to make that same mistake again. I wanted to make something useful that would help servers get rid of idle players taking up their precious slots.
So I present to you: AFK Timer. A simple tool that checks if a player is AFK every 10 minutes (This will be changeable in the future.). If the player doesn’t hit the okay button, it kicks them.
Here are some screenshots of the tool.
I know it isnt much but I plan on adding on to this as my abilities with lua get better I will be adding new customization options to this.
45 Minute AFK Timer.
Admin Immunity to afk check
sv_afktime - The time it takes in minutes for the Checker to show up. The default is 45 minutes.
sv_kicktime - The time it takes in seconds for the player to be kicked. Don’t set this lower than the afk timer or the addon will not work.
sv_kickmessage - The message that shows up when a player is kicked for being afk.
Color chooser for the menu and text built into an admin menu for the tool
Admin menu for the tool
[del]ConVars so you can set the amount of time on the timer and the kick text.[/del]
I want to improve this simple addon as much as I can while I learn lua, so please give me some feedback.
I also know that tools such as ULX have an afk kicker, I wanted one that required the user to click a button to continue.