Monthly Target: $400 Donations: $228
 56% 

AFK Manager v1.0.2.5


Post New Thread Reply   
 
Thread Tools Display Modes
Author
dubbeh
Senior Member
Join Date: Jul 2007
Location: UK
Plugin ID:
138
Plugin Version:
1.0.2.5
Plugin Category:
Gameplay
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    14 
    Plugin Description:
    AFK manager for SourceMod that can check for consecutive deaths (CSS/HL2 DM), rounds with no user movement or timer based (TF2+)
    Unapprover:
    Reason for Unapproving:
    Reported to not be working.
    Old 08-16-2007 , 03:55   AFK Manager v1.0.2.5
    Reply With Quote #1

    AFK Manager v1.0.2.5

    About:
    AFK manager for SourceMod that can check for consecutive deaths (CSS/HL2 DM), rounds with no user movement or timer based (TF2+)

    Languages supported:
    English
    German - Thanks to -<[PAGC]>- Isias
    Russian - Thanks to allig4t0r
    French - Thanks to ColdFire
    Spanish - Thanks to wapo20

    Server Console Vars:
    Quote:
    // Enable the AFK Manager
    afkm_enable "1"

    // Should players in-game be swapped to spec before getting kicked
    afkm_swap_to_spec "1"

    // Give admins global immunity from AFK counts
    afkm_admins_immune_global "0"

    // Moves admins to spectator but doesn't kick them or add AFK counts
    afkm_admins_immune_spec "1"

    // Minimum player count to start kicking spectators
    // 0 to disable
    afkm_min_players_kick_spec "8"

    // Warn a user about AFK counts
    afkm_warn_user "1"

    // How should players get warned for AFK counts
    // 0 = Disabled
    // 1 = Hint
    // 2 = Chat
    afkm_warn_msg_type "1"

    // Allow the spectator AFK point removal panel
    // 0 = disable
    afkm_spec_removal_panel "1"

    // 0 = Check using the rounds with no movement based method
    // 1 = Check using the consecutive deaths based method
    // 2 = Check using a timer based method
    afkm_check_type "2"

    // Maximum rounds before a player can be AFK in-game
    // 0 = disable
    afkm_ingame_rounds_limit "3"

    // Maximum rounds a player has in spec before getting kicked
    // 0 = disable
    afkm_spec_rounds_limit "3"

    // Maximum rounds a player has unassigned before getting kicked
    // 0 = disable
    afkm_unassigned_rounds_limit "3"

    // Number of straight deaths a player has before getting kicked
    afkm_deaths_limit "20"

    // How many minutes before kicking an unassigned client
    // 0 = disable
    afkm_max_unassigned_time "5"

    // How many minutes before a spectator is kicked
    // 0 = disable
    afkm_max_spec_time "5"

    // How many minutes before a client is kicked for no movement in-game
    // 0 = disable
    afkm_max_ingame_time "4"

    // Number of times a player can get kicked before getting banned
    // 0 = disable
    afkm_kick_count_limit "0"

    // How long will a player get banned for when breaking the kick count limit
    afkm_kick_count_ban_time "30"

    // How many maps to record kick counts for AFK violations
    afkm_kick_count_maps_record "4"

    // How many minutes to record kick counts for AFK violations
    afkm_kick_count_time_record "60"
    Notes:
    - Swap to spec option will only work on mods that follow the SDK team define standards


    Installation:
    afkm.smx -> addons\sourcemod\plugins
    afkm.sp -> addons\sourcemod\scripting
    afkm.phrases.txt -> addons\sourcemod\translations
    plugin.afkm.cfg -> cfg\sourcemod


    Version History:
    v1.0.2.5
    - Reduced vector distance checking from 500 to 100 (Should reduce false positives)
    - Added Spanish translations, Thanks to wapo20
    - Used the same hack from Radio to fix config execution issue
    - Switched the admin flag to Reservation from Generic
    - Changed admin access from Access_Effective to Access_Real
    v1.0.2.4
    - Map based kick counts can now be disabled with 0
    - AFK check spectator panel in only drawn once the client hits over half spectator AFK time
    - Added a check for invalid handles when the plugins unloading
    - Stopped automatically creating the config if it's not found in "cfg/sourcemod"
    - Admins will now need the Generic flag to get immunity
    - Fixed the invalid handle message when the plugin unloads
    - Warning messages can now be disabled (0 = Disable | 1 = Hint | 2 = Chat)
    - Russian translation added - Thanks to allig4t0r
    v1.0.2.3
    - Fixed a bug with the timer based kick counts
    - Fixed a bug with the unassigned messages
    - Added a spectator AFK check panel to the timer based method
    - German translation now included - thanks to -<[PAGC]>- Isias
    v1.0.2.2
    - Recoded the rounds based checking
    - Translations now supported
    - The warnings can now be set as hint or chat messages
    - Changed quite a few of the cVar names
    - Spectator AFK point removal panel can now be disabled
    - Lots more changes that I've forgot about
    v1.0.2.1
    - Changed the AFK timer based algorithm a little bit
    - Added hint messages for when a client hits half AFK counts
    v1.0.2.0b
    - Added timer based AFK checking (TF2 support)
    - All messages changed to hint based dialogs
    - Death based checking now supports kick counts
    - The kick counts array can now be cleared after a certain amount of time
    v1.0.1.1
    - Fixed a PrintToChat bug - forgot to add the colour defines in the formatting
    v1.0.1.0b
    - Changed all the cvars to "afkm_"
    - Speeded up a few parts of the code, but also added more over head with some of the newer options
    - Lots of the requests filled, all the new options can be found with descriptions in the server console vars list
    - Fixed a bug with the death based AFK counts
    v1.0.0.2
    - Changed the moved distance calculation
    v1.0.0.1
    - Fixed a small bug with the spectator kick count
    v1.0.0.0
    - Fixed a couple of max clients problems - Thanks to ^BuGs^
    - Taken the plugin out of beta
    v1.0.0.2 BETA
    - Hopefully fixed all possibly bugs now
    - Added Pred's idea to draw a panel to a client & if they press one then an AFK count is removed
    v1.0.0.1 BETA
    - Recoded certain bits & made the code less ugly
    - Removed player_spawn hooking - not needed with the recode
    - AFK warning in now shown in death based checking too
    v1.0.0.0 BETA
    - Initial public beta release

    Have fun

    Thanks to Nican for an idea of storing steam ids for faster lookup
    Attached Files
    File Type: cfg plugin.afkm.cfg (2.1 KB, 2731 views)
    File Type: txt afkm.phrases.txt (5.9 KB, 136 views)
    File Type: sp Get Plugin or Get Source (afkm.sp - 310 views - 31.8 KB)
    __________________
    SM Plugins - dubbeh.net - Plugin requests are welcome

    Last edited by dubbeh; 08-05-2015 at 15:07. Reason: Updated
    dubbeh is offline
    Peoples Army
    SourceMod Donor
    Join Date: Mar 2007
    Old 08-16-2007 , 08:17   Re: AFK Manager
    Reply With Quote #2

    awsome , this is going on my server! Gj
    Peoples Army is offline
    dubbeh
    Senior Member
    Join Date: Jul 2007
    Location: UK
    Old 08-16-2007 , 09:39   Re: AFK Manager
    Reply With Quote #3

    Thanks

    Just finished a recode of certain parts & put up the latest build - code should be faster too
    __________________
    SM Plugins - dubbeh.net - Plugin requests are welcome
    dubbeh is offline
    Rebell
    Veteran Member
    Join Date: Nov 2004
    Location: GERMANY
    Old 08-16-2007 , 10:34   Re: AFK Manager
    Reply With Quote #4

    Oh cool plugin - will try out asap ^^


    cya
    __________________
    Rebell is offline
    chef316
    New Member
    Join Date: Aug 2007
    Old 08-16-2007 , 10:48   Re: AFK Manager
    Reply With Quote #5

    That┤s one of the plugins I was hardly missing since I converted from Mani to SourceMod.

    I will test it directly.
    chef316 is offline
    dubbeh
    Senior Member
    Join Date: Jul 2007
    Location: UK
    Old 08-16-2007 , 13:10   Re: AFK Manager
    Reply With Quote #6

    New version that hopefully fixes all possible bugs
    __________________
    SM Plugins - dubbeh.net - Plugin requests are welcome
    dubbeh is offline
    ^BuGs^
    Senior Member
    Join Date: May 2007
    Old 08-16-2007 , 14:29   Re: AFK Manager
    Reply With Quote #7

    Code:
    public OnMapStart ()
    {
        static i = 0;
        g_iMaxClients = GetMaxClients ();
    
        for (i = 0; i <= MAXPLAYERS; i++)
        {
            ResetClient (i);
        }
    }
    Will fail. Client Index start at 1 and go to 64.

    Code:
    public OnMapStart ()
    {
        for (new i = i; i <= GetMaxClients (); i++)
        {
            ResetClient (i);
        }
    }
    For the other places that you use g_iMaxClients, just change it to the GetMaxClient() function so you don't have to use memory and keeps up with the reserved slots plugin if someone had it installed.
    __________________
    Sourcemod Plugin Author and Plugin Approver
    "The correct way is MAXPLAYERS + 1"
    I will not take bugs/new idea reports over the forums. Please use the issue list.
    ^BuGs^ is offline
    dubbeh
    Senior Member
    Join Date: Jul 2007
    Location: UK
    Old 08-16-2007 , 14:40   Re: AFK Manager
    Reply With Quote #8

    Thanks for the info bugs - updated the plugin with the recommended changes
    __________________
    SM Plugins - dubbeh.net - Plugin requests are welcome
    dubbeh is offline
    spelworm
    Senior Member
    Join Date: Mar 2007
    Old 08-16-2007 , 17:11   Re: AFK Manager
    Reply With Quote #9

    Nice job dubbeh question though : will they first get moved to spec then get kicked or is there a convar that selects this ? since i got kinda confused on the cvars information

    Shouldnt this be 0 = rounds based 1 = consecutive or ?
    Quote:
    Originally Posted by dubbeh View Post
    AFK Manager v1.0.0.0

    afk_manager_check_type "0/1" - AFK Manager check type - 0 = Rounds based (Default) - 2 = Consecutive deaths based
    the round limit they get kicked or moved to spec ? how can ya say if u want them to move to spec or get kicked

    Quote:
    Originally Posted by dubbeh View Post
    AFK Manager v1.0.0.0
    afk_manager_rounds_limit "1/20" - Rounds a player can be AFK before getting kicked/moved to spec
    this means they dont get moved to spec or ?

    Quote:
    Originally Posted by dubbeh View Post
    AFK Manager v1.0.0.0
    afk_manager_deaths_limit "1/100" - Number of consecutive deaths a player can have before getting kicked
    I cant test it myself how it works atm thats why i asked

    anyways good job making this now i just need 1 more thing then i dont even desire mani anymore ;)
    spelworm is offline
    dubbeh
    Senior Member
    Join Date: Jul 2007
    Location: UK
    Old 08-16-2007 , 17:34   Re: AFK Manager
    Reply With Quote #10

    Quote:
    Originally Posted by spelworm
    Shouldnt this be 0 = rounds based 1 = consecutive or ?
    Yeah, thanks for pointing that out

    Quote:
    Originally Posted by spelworm
    the round limit they get kicked or moved to spec ? how can ya say if u want them to move to spec or get kicked
    Set afk_manager_spec_rounds_limit "X" X for how many rounds before getting kicked in spectator, 0 = off


    afk_manager_deaths_limit cVar is the number of deaths before getting kicked - balance type needs to be set to 1
    __________________
    SM Plugins - dubbeh.net - Plugin requests are welcome

    Last edited by dubbeh; 08-18-2007 at 05:57.
    dubbeh is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 08:29.


    Powered by vBulletin®
    Copyright ©2000 - 2017, vBulletin Solutions, Inc.
    Theme made by Freecode