[ANY] AFK Manager (Version 4.3.0 / Updated July 2nd 2018)
5 Attachment(s)
AFK Manager
Table of Contents
Information This plugin has been designed to manage AFK players, it has a General AFK check along with a Spawn AFK check. It checks player commands for button changes and mouse movements to determine if a player is "AFK". If the player is not "typing/chatting", pressing any buttons or performing any movements of their mouse, they are deemed "AFK" and the plugin can move and/or kick them after a specified amount of time. It will warn players who are detected as "AFK" before being moved or kicked based on specific variables in 5 second intervals. This plugin has been designed to utilize a translation file for use of other languages. Requirements SourceMod v1.4.0+ (Previous version 3 branch) SourceMod v1.7.0+ (Latest version 4 branch) For Automatic Update support you need to do the following: You need to compile the plugin manually with the "updater.inc" as per the compile instructions below. You can download the latest version of the SourceMod "Updater" include file and plugin from: http://forums.alliedmods.net/showthread.php?t=169095 For Color support you need to do the following: You need to compile the plugin manually either with "Multi Colors" (preferred), "morecolors.inc" or "colors.inc" as per the compile instructions below. Multi Colors: Note: Latest "Multi Colors" version requires SourceMod 1.7.0+ Old Release Commit (Working with SourceMod 1.5.0 if you are using version 3): https://git.tf/Bara/Multi-Colors/tree/89cdb804ffc6544b72ec239ea4c507af68de14c8/addons/sourcemod/scripting/include You can download the latest version of the SourceMod "Multi Colors" include file(s) from: https://forums.alliedmods.net/showthread.php?t=247770 More Colors (morecolors.inc): Note: Latest "More Colors" version now requires compiling with SourceMod 1.5.0+ and does not work properly for at least CS:GO You can download the latest version of the SourceMod "More Colors" include file from: https://forums.alliedmods.net/showthread.php?t=185016 Colors (colors.inc): Note: This include is no longer supported and fails on some newer mods/servers You can download the latest version of the SourceMod "Colors" include file from: https://forums.alliedmods.net/showthread.php?t=96831 Installation Details Download the "afk_manager.phrases.txt" and save to your addons\sourcemod\translations directory. Pre-compiled: Download using the "Get Plugin" link and save to your addons\sourcemod\plugins directory. Self-Compile: Download the "afk_manager4.sp" using the "Get Source" link and save to your addons\sourcemod\scripting directory. Quote:
Quote:
Quote:
NOTE: If you get an error I would first recommend updating your SourceMod. Server Console Variables (ConVars)
Server Commands
If you are a plugin developer who wants to add mod specific or server specific functionality to the AFK Manager or to be able to detect AFK status in your own plugin you can now use the Native and Forwards I have created to do so. If you want a generic AFK feature to be added which would be beneficial to any mod, post in the thread so I can review. Information can be found in the afk_manager.inc and the features are currently implemented in the latest release, I believe the functions are about 80% complete, so be aware they could change in the future. I am open to any feedback on whether you want to get more information from the AFK Manager or whether you think any of the current functions should change. Example Plugins for Developers I have written a couple of small example plugins for Counter-Strike/CS:GO to show a few methods of how you can use the AFK Manager natives and forwards: Example Plugin #1 This plugin does not use any of the forwards: http://afkmanager.dawgclan.net/scrip...ger_cstrike.sp The plugin was based off RedSwords original AFK Bomb plugin (https://forums.alliedmods.net/showthread.php?t=152329). In the example you can see how I check for "Active" Terrorist players (Not marked as AFK for even 1 second) in the AFK_RandomBomb() function using AFKM_IsClientAFK(). You can also see how I have created a timer for any players with the Bomb and take action after a certain amount of AFK time in the Timer_CheckPlayer() function using AFKM_GetClientAFKTime(). Please note while I was making this I found there was a bug in the CS_DropWeapon() function for CS:GO where the toss was not working which has been fixed in release 1.8.0.6009 and 1.9.0.6101, thanks to the #SourceMod guys for their input help and fixes. Example Plugin #2 This plugin is more specific to CS:GO around Team Swapping Issues/Modifications: http://afkmanager.dawgclan.net/scrip..._teamchange.sp In this example you can see how I use the "AFK" forward events for "afk_move" and "afk_kick" to mark the player as "Moved" so that we can allow them to join a team again straight away by bypassing the "Pending" team change mode that Valve has implemented. I have also on request added a couple of additional options to: Provided a variable to override the pending team change for all players irrespective of whether they were moved by the AFK manager. Provided a variable to block players from changing directly between Terrorist and Counter-Terrorist Teams. Again these plugin are examples, there are no current translations or anything to notify players about the actions taken in these plugins. If people are interested in me enhancing these to actually be a full blown sister plugin with certain features or want to take the projects on yourself let me know. Change Log * See the afk_manager.changelog.txt for old version information.
- Added new AFK buttons variable which will allow you to disable button change detection completely (Would rely on mouse movements only) or track a certain number of unique buttons. Please let me know if you experience any issues or problems. Credits
Completed Language Translations
Other plugins made by me: Anti-TK Manager: http://forums.alliedmods.net/showthread.php?t=80554 File Information afk_manager-compat - This is an old release which is no longer kept up-to-date and only available for older SourceMod releases. It can be found in the afk_manager_old.zip afk_manager3 - This was the previous version. It can be found in the afk_manager_old.zip afk_manager4 - This is the current version. Most people should use the new version that is NOT in the zip file. Compiled Download with Multi Colors and Updater If you are looking for a compiled download of the latest version of the AFK Manager which includes both "Multi Colors" and "Updater" include files, you can use the Updater download URL Must User Right Click Save As: http://afkmanager.dawgclan.net/plugins/afk_manager4.smx The compiled download URL should be static and contain the latest version of the plugin if you for example want to add to server provisioning scripts or similar, please also make sure you get the translation file either through the forum or via the Updater download URL http://afkmanager.dawgclan.net/trans...er.phrases.txt |
Re: AFK Manager
Quote:
Now, I'm no sourcemod developer, but adding new MaxClients = GetMaxClients(); after the lines // Late Load? and public OnMapStart() { caused it to compile correctly....I'll test it... (note: Web Compile will not work because of the missing semicolon) Also, it's not working in synergy. My config is this: Code:
// This file was auto-generated by SourceMod (v1.0.4) |
Re: AFK Manager
He compiled it vs. 1.1.0 which contains the variable MaxClients and the ; in sdk_tools.
|
Re: AFK Manager
Quote:
I believe MaxPlayers has been modified by pred to make it work, I remember seeing a commit saying the rtv plugin etc have been changed to use this new variable, not sure if it's only in the 1.1 trunk or not. As for your problem with it not working change sm_minplayersmove to be at least 1, I believe 0 would be disabled. Ok was just told that the MaxClients variable might be 1.1 only, if there is a need to use with 1.0 SourceMod versions let me know and I'll make some changes. |
Re: AFK Manager
Dont forget to post the compiled plugin as an smx so everyone doesnt have to compile. Are a flagged clients immune too?
|
Re: AFK Manager
Ok changed the MaxClients variable to try and use the older method supported by 1.0x branch of SourceMod.
Uploaded a compiled version of the plugin as well. Quote:
|
Re: AFK Manager
Now I'm getting this error:
Quote:
Quote:
|
Re: AFK Manager
Er,
Can you type sm plugins list Tell me if the plugin is loaded? Then check the plugin number and type sm plugins debug # on Where # is replaced with the plugin number and tell me if it still says the plugin is not runnable??? it it was not runnable then how did it even get to the error message. Once I know where it's complaining about checking the IsClientConnected I can look at fixing it but I don't think that error should be causing any problems, sounds like maybe it was doing a check but the client was disconnected or disconnecting or something. Also upon some checking, I think the attached compiled smx file was wrong, I have uploaded a new version. |
Re: AFK Manager
Ok after consideration I have now changed this plugin and made it require 1.1 trunk version of SourceMod, you can read the original post for more details.
|
Re: AFK Manager
First of all, Synergy doesn't like SM 1.1
Second, I'll answer your questions anyway: The plugin IS loaded with errors I told you what happens when I try to turn on debug |
All times are GMT -4. The time now is 19:50. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.