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

AFK Manager


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   General Purpose       
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 09-12-2007 , 09:46   AFK Manager
Reply With Quote #1

AFK Manager v1.2
  • Description
-I know there are some Afk plugins around here,but some of them with bugs or errors, others are not Supported/Updated.
-Plugin use last activity time to check the actual afk time.
-Plugin has a menu, through you can see all players with they'r afk time ; and a submenu for admins through you can manage afk(selected) players(Put them on spectators / Kick).
-Admins are marked in menu, also dead players with "(Dead)" tag.
-Autocheck system, for checking afk players, with spectators slots protection(If in spectators team are more than "X Defined" afk players, a random one will be kicked).
-Autocheck system for bomb ; if bomb carrier is afk the bomb is droped & transfered to a random alive T player.
-Autocheck for unassigned player.
-Full server spec kick ; If server is full and a player is connecting, the player with biggest afk time will be kicked.
-CPU less.
  • Cvars / Commands
afk_autocheck (Default:1) - Autocheck for afk players
afk_ac_fastmachine (Default:0) - If this cvar is set to 1, players will be checked every second (1.0)
afk_ac_time (Default:20) - The interval of time, for checking afk players
afk_ac_immunity (Default:1) - If this cvar is set to 1, admins are not checked
afk_ac_maxafktime (Default:80) - Time in seconds, how much a player can be afk
afk_ac_bombtime (Default:20) - Time after the afk player drop the bomb.
afk_ac_punish_type (Default:1) - 1 = Move to spec. / 2 = Kick
afk_menu (Default:1) - Enable / Disable Afk menu. (0 Off) (1 All players) (2 Admins Only)
afk_unassigned_check (Default:1) - If a player stays more than "x" sec at unassigned team, will be kicked
afk_unassigned_time (Default:15) - Unassigned max time
afk_fs_kick_spec (Default:1) - If server is full and a player is connecting, a player from spec, will be kicked.



say /afk ----------|Show AFK menu
say_team /afk ---|
  • Modules
Fakemeta
Cstrike
  • Notes
Code:
#define MIN_CHECK_TIME 10 - Minim interval of time for autocheck system
#define MAX_AFK_SPECTATORS 3 - If are more that this num of afk players on spectators team,player with biggest afk time will be kicked.
#define ADMIN_ACCES_FLAG ADMIN_MENU - Admin flag to access Afk Submenu.
#define ADMIN_IMMUNITY_FLAG ADMIN_KICK - Immunity flag
  • Changelog
v1.0
*Initial release.
v1.1
*Code optimized, thanks danielkza, Zenith77
*Added ML system.
*Added cvar for disable/enable Afk menu, thanks koloyu.
*Added Afk bomb check, thanks Isobold for some functions.
*Added afk bomb switch thingy, thanks to VEN! The bomb is droped and transfered to an random alive T player.
v1.1a
*afk_menu 0(Off) 1(All) 2(Admins).
*Immunity flag check at autocheck afk and spectators.
#define ADMIN_IMMUNITY_FLAG ADMIN_KICK
*If user is recording a demo will not be kicked from spectators,even if is a normal player.
v1.2
*Now plugin kick the spectator who have been Afk for the longest time. (connorr)
*Added german translation. (Mordekay)
*Afk AutoCheck, bug fixed. (koloyu)
*Added Unassigned player check. (manix)
*Added Full Server Kick spec, when a player is connecting and server is full, a player from spectators is kicked. (bmann_420 / hoboman)
*Little bug fixed.
*Little fix in menu thing.
*Code optimized, thanks Zenith77.

Menu pictures:
* http://img505.**************/img505/4264/afk1md3.png
* http://img528.**************/img528/7771/afk2xk7.png
Attached Files
File Type: sma Get Plugin or Get Source (afk_manager.sma - 3694 views - 11.1 KB)
File Type: txt afk_manager.txt (2.0 KB, 1701 views)
__________________
Still...lovin' . Connor noob! Hello

Last edited by Alka; 09-17-2007 at 10:19.
Alka is offline
BlackMilk
Veteran Member
Join Date: Jun 2007
Old 09-12-2007 , 12:52   Re: AFK Manager
Reply With Quote #2

Just a random idea that popped into my head:
Client command (public use)
say /afk <time> <a | b>
Example:
say /afk 60 a

A person says he's afk for 60 seconds, and if he doesn't type something like /bck or whatever, he has chosen to be kicked. (flag a, and flag b would be move to spectators)
Maybe make it 60s or 60m instead BTW, like seconds/minutes.
then eg.

say /afk 1m b
(move to spectator if not /bck after/within 1 minute)

EDIT: Like I said, just a random idea that popped into my head a few seconds ago, dunno if it's useful or exploitable or w/e.
__________________
Mod:
User:
BlackMilk is offline
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 09-12-2007 , 12:58   Re: AFK Manager
Reply With Quote #3

If you allow me, i can suggest u some modifications to help make it better.

1-)Don't set the task in plugin_init,so you can enable/disable it in game.

2-)Don't use flag "b" in tasks.It's better to re-set the task on the end of the function so you can change the cvar on-demand

3-)Don't check button by button in the cmdstart forward.Just check if its not 0.

4-)In check_spec_slots,you can get the player list like you did in the second time.And you don't need to store the randoms.You can put it like this:

Code:
server_cmd("kick #%i ^"%s^"", get_user_userid(specplayers[random_num(0, specnum)]), afk_kick_reason);

5-) You can join lots of expressions,if you don't find which ones PM me.
danielkza is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-12-2007 , 13:14   Re: AFK Manager
Reply With Quote #4

6 ) Also, ML system would be welcome.
__________________
Arkshine is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 09-12-2007 , 13:58   Re: AFK Manager
Reply With Quote #5

@BlackMilk - Hmmm, dunno, i want to be just a management tool.
@danielkza - Good point.
@arkshine - :S...maybe
__________________
Still...lovin' . Connor noob! Hello

Last edited by Alka; 09-12-2007 at 14:15.
Alka is offline
koloyu
Junior Member
Join Date: May 2007
Location: Gdansk, Poland
Old 09-12-2007 , 14:41   Re: AFK Manager
Reply With Quote #6

I have some idea:
- add afk bomb drop (with cvar ~afk_bomb_time X) [something like ~afk kisss- all in one ;] so can't use many plugins to same actions]
- add cvar for disable menus
- if you know how to- add a spectator checker (with cvar)- if spectator recording demo then no kick him, if he don't recording- kick.

Sry for bad english.
koloyu is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 09-12-2007 , 15:39   Re: AFK Manager
Reply With Quote #7

Updated v1.1
*Code optimized, thanks danielkza.
*Added ML system .
*Added cvar for disable/enable Afk menu, thanks koloyu.
*Added Afk bomb check, thanks Isobold for some functions.
__________________
Still...lovin' . Connor noob! Hello

Last edited by Alka; 09-12-2007 at 15:45.
Alka is offline
bmann_420
AMX_Super Pooper
Join Date: Jan 2005
Location: [SuperCentral.co]
Old 09-12-2007 , 17:50   Re: AFK Manager
Reply With Quote #8

What do you think about AFK bomb switch? (Switch bomb to another person if afk)

I like it tho, VEN's doesnt always work sadfully, and all others are unsupported.
__________________
bmann_420 is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 09-12-2007 , 18:00   Re: AFK Manager
Reply With Quote #9

I have an idea, maybe i will do something!
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 09-12-2007 , 19:25   Re: AFK Manager
Reply With Quote #10

Little Update
*Added afk bomb switch thingy, thanks to VEN! The bomb is droped and transfered to an random alive T player.
*I've tested this hmm, many times, and looks like is working fine :S
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Reply



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 12:10.


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