Raised This Month: $12 Target: $400
 3% 

[CS:S] AFK Manager Lite v1.1 (Updated 07/01/13)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
KorDen
Member
Join Date: Sep 2012
Plugin ID:
3681
Plugin Version:
1.1-css
Plugin Category:
Server Management
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Servers with this Plugin:
    Plugin Description:
    Lite version of Rothgar's AFK Manager, only for CS:S
    Old 06-06-2013 , 02:14   [CS:S] AFK Manager Lite v1.1 (Updated 07/01/13)
    Reply With Quote #1

    Description
    I'm used AFK Manager by Rothgar for long time on my servers. I think that this plugin have best logic in AFK check (checking chat, etc...) than other AFK plugins.
    But after looking at the code.. Wait, on my server here will be up to 64 timers?! I made a lot of optimization at my plugins list (one of my plugins is 9 Kb and have functionality of 10 plugins like ShowDamage, ResetScore,...), so I started cleaning code of AFK Manager.
    Basic idea is:
    1) Split games - currently I have only CSS version, but I want to make TF2 version later
    2) Remove cvars that most people don't change, e.g. threshold.
    3) Optimize logic based on current game

    This plugin use logic "move at X, kick at Y", excluding dead players and bots, without different spawn wait time and some original plugin features.
    Only one timer, no global handles at all.

    Cvars
    • sm_afk_move_min - minimum count of players to start moving players to spectators
    • sm_afk_kick_min - minimum count of players to start kicking players
    • sm_afk_move_time - AFK time for moving player to spectators, 0 - disable AFK Move
    • sm_afk_kick_time - AFK time for kicking player, 0 - disable AFK Kick
    • sm_afk_warn_time - Remaining time for action to start warn player (for both kick & move)
    • sm_afk_immune - Amins immunity: 0 - disabled, 1 - complete, 2 - kick, 3 - move
    • sm_afk_immune_flag - Admin flag for immunity check (blank=any flag)

    Installation
    • Put .smx in plugins folder and (optionally) .sp in scripting folder
    • Put afk_manager_css.phrases.txt in translations folder
    • Plugin will create config file at cfg/sourcemod folder after loading

    Changelog (CSS)
    • 06/06/13 - v1.0
      Initial release
    • 07/01/13 - v1.1
      * Removed moving players to spectators if they in Unassigned team (but still counts them as AFK for kicking)
      * Small code cleaning & more comments on code
    Attached Files
    File Type: txt afk_manager_css.phrases.txt (4.2 KB, 3026 views)
    File Type: sp Get Plugin or Get Source (afk_manager_lite_css.sp - 5391 views - 12.0 KB)

    Last edited by KorDen; 07-01-2013 at 07:39.
    KorDen is offline
    KorDen
    Member
    Join Date: Sep 2012
    Old 06-06-2013 , 02:16   Re: [CSS] AFK Manager Lite
    Reply With Quote #2

    Hmm.. Reserved?
    KorDen is offline
    eyes of hunter
    Member
    Join Date: Dec 2011
    Old 06-06-2013 , 05:34   Re: [CSS] AFK Manager Lite
    Reply With Quote #3

    Thanks for this plugin! We are using Rothgar's too but will try this one and see if it works fine.
    eyes of hunter is offline
    eyes of hunter
    Member
    Join Date: Dec 2011
    Old 06-09-2013 , 04:52   Re: [CSS] AFK Manager Lite
    Reply With Quote #4

    So far so good. No errors and it does its job perfectly.
    eyes of hunter is offline
    eyes of hunter
    Member
    Join Date: Dec 2011
    Old 06-16-2013 , 04:19   Re: [CS:S] AFK Manager Lite
    Reply With Quote #5

    By the way, one little thing.

    Is there a way to make it so the player who gets moved to spec does not get one frag substracted and one death added?

    If I'm not mistaken, your plugin, like Rothgar's, force the player to suicide, and people keep complaining about that issue (pretty nitpicking, I know) so it would be wonderful if there was some other method, or if the score was modified back to what it should be after the spectator starts to play again.

    Thanks!
    eyes of hunter is offline
    KorDen
    Member
    Join Date: Sep 2012
    Old 06-16-2013 , 06:42   Re: [CS:S] AFK Manager Lite
    Reply With Quote #6

    Quote:
    Originally Posted by eyes of hunter View Post
    If I'm not mistaken, your plugin, like Rothgar's, force the player to suicide, and people keep complaining about that issue (pretty nitpicking, I know) so it would be wonderful if there was some other method, or if the score was modified back to what it should be after the spectator starts to play again.
    Yes, my plugin moving to spectators with suicide, like Rothgar's one. You can remove string #325 "ForcePlayerSuicide(client);" and compile plugin, BUT, if you remove this and AFK is the last player in the team round will not end properly. Also this create glithes to some plugins, e.g. in CSS:DM Equipment player that moved without suicide will not see weapon menu after comnig back to team until death. So this is bad idea to remove suicide code.. Also, if I will add code to restore frags, this will not restore stats points... (e.g. HLstatsX give -25 for suicide)

    Last edited by KorDen; 06-16-2013 at 06:48.
    KorDen is offline
    eyes of hunter
    Member
    Join Date: Dec 2011
    Old 06-16-2013 , 08:10   Re: [CS:S] AFK Manager Lite
    Reply With Quote #7

    I see. Lots of trouble, so not worth it. Thanks for the reply anyway!
    eyes of hunter is offline
    ocwoody
    AlliedModders Donor
    Join Date: Nov 2010
    Location: huh
    Old 06-22-2013 , 02:29   Re: [CS:S] AFK Manager Lite
    Reply With Quote #8

    Small bug. When the map changes and players are spectating from the last map it tries to move them to spectate again. This is due to the fact that playerspawn fires for each client when the map changes I believe.

    Last edited by ocwoody; 06-22-2013 at 02:30.
    ocwoody is offline
    KorDen
    Member
    Join Date: Sep 2012
    Old 06-22-2013 , 03:37   Re: [CS:S] AFK Manager Lite
    Reply With Quote #9

    Quote:
    Originally Posted by ocwoody View Post
    Small bug. When the map changes and players are spectating from the last map it tries to move them to spectate again. This is due to the fact that playerspawn fires for each client when the map changes I believe.
    If after map change they not joined spectators manually (choosed 6), then they will be in team 0 (Unassigned), not spectators, untill they choose any thing in team choose dialog, (this can't be linked with their state at previous map) so it moves they to spectators first and this isn't a bug. Is this situation describes what you mean?

    Last edited by KorDen; 06-22-2013 at 03:37.
    KorDen is offline
    ocwoody
    AlliedModders Donor
    Join Date: Nov 2010
    Location: huh
    Old 06-22-2013 , 17:22   Re: [CS:S] AFK Manager Lite
    Reply With Quote #10

    Yeah you're correct. They don't choose spectators and are left in team 0 (Unassigned). Would be nice to have a cvar to disable checking unassigned players.
    ocwoody 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 11:10.


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