AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [CS:S] AFK Manager Lite v1.1 (Updated 07/01/13) (https://forums.alliedmods.net/showthread.php?t=217680)

KorDen 06-06-2013 02:14

[CS:S] AFK Manager Lite v1.1 (Updated 07/01/13)
 
2 Attachment(s)
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

KorDen 06-06-2013 02:16

Re: [CSS] AFK Manager Lite
 
Hmm.. Reserved?

eyes of hunter 06-06-2013 05:34

Re: [CSS] AFK Manager Lite
 
Thanks for this plugin! We are using Rothgar's too but will try this one and see if it works fine.

eyes of hunter 06-09-2013 04:52

Re: [CSS] AFK Manager Lite
 
So far so good. No errors and it does its job perfectly.

eyes of hunter 06-16-2013 04:19

Re: [CS:S] AFK Manager Lite
 
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!

KorDen 06-16-2013 06:42

Re: [CS:S] AFK Manager Lite
 
Quote:

Originally Posted by eyes of hunter (Post 1971216)
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)

eyes of hunter 06-16-2013 08:10

Re: [CS:S] AFK Manager Lite
 
I see. Lots of trouble, so not worth it. Thanks for the reply anyway!

ocwoody 06-22-2013 02:29

Re: [CS:S] AFK Manager Lite
 
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.

KorDen 06-22-2013 03:37

Re: [CS:S] AFK Manager Lite
 
Quote:

Originally Posted by ocwoody (Post 1974870)
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?

ocwoody 06-22-2013 17:22

Re: [CS:S] AFK Manager Lite
 
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.


All times are GMT -4. The time now is 16:05.

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