DoD Plugins Archive
This site is an archive — everything is readable and downloadable, nothing can be posted.
Hello There, Guest!

Thread Rating:
  • 3 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DoD AFK Manager (v1.0)
#1
// DESCRIPTION:
// ============
//
// This is a real simple, but powerful AFK/Spectator Kicker!
// It's absolutely independent from the players position on
// the map as the counter until he's kicked starts to run down
// as soon as he joins the server and is only reset and starts
// from the beginning in the following cases:
// - player damages/kills another player
// - player gets score for taking a flag
// - player types in global-/teamchat
// - player throws a grenade
// - player changes team / switches class
// The SpectatorKicker is completely independent from the AFKKicker,
// as the action of the AFKKicker stops as soon as a player joins
// Spectators and the SpecktatorKicker takes over. Same applies
// vice versa, so you can safely only use one (or both for sure) parts
// of the plugin.
//
// * admins with a reserved slot who are afk aren't kicked
// * spectating admins aren't kicked
// * fakeclients, bots, hltvs aren't kicked either

Quote:// USAGE:
// =====
//
// cvars:
// ------
//
// dod_afkmanager_afkkick <1/0> = enable/disable AFK Manager (kicker)
//
// dod_afkmanager_afkkicktime <time> = sets time in seconds a player can be AFK
// before he's kicked off the server.
//
// dod_afkmanager_speckick <1/0> = enable/disable SpectatorKicker
//
// dod_afkmanager_speckicktime <time> = sets time in seconds a player can be a
// spectator before he's kicked off the server
//
// dod_afkmanager_minplayers <amount> = minimum number of players that have to be on the
// server to get rid of afks and spectators

Quote:// CHANGELOG:
// ==========
//
// - 13.07.2005 Version 0.5beta
// Initial Release
//
// - 17.07.2005 Version 0.6beta
// bugfixes:
// - fixed errors that resulted from missing
// checks whether the player was already connected
// or still connecting.
//
// - 12.08.2005 Version 0.7beta
// tweaks:
// - added afktimer reset for shooting, switching weapons
// and bringing up the scope (snipers)
// bugfix:
// - resetting afktimer for capping flags is working now
//
// - 26.06.2007 Version 0.8
// - removed unneeded code
// - removed unreliable afk-timer reset-functions
// - added reset for throwing grenades
// - added reset for changing class
// - updated "team change function" to use dod_client_changeteam
// forward
// - changed to pcvar system
// - optimized the code
//
// - 27.06.2007 Version 0.85
// - replaced only catching Global-/TeamChat of a player
// with catching all of his commands.
// - commands like "sprone, weapon_* , say, say_team" are cought
// now
//
// - 02.07.2007 Version 0.9
// - added global tracking cvar
//
// - 20.07.2007 Version 1.0
// - replaced "client_death" with hooking the
// "DeathMsg"-Event for better reliability
// - added "German" language definitions to the
// language file
//


Attached Files
.sma   dod_afkmanager.sma (Size: 8.17 KB / Downloads: 471)
.txt   dod_afkmanager.txt (Size: 694 bytes / Downloads: 420)
#2
Any change the amxx mode can be created ???
#3
snowyfriend Wrote:Any change the amxx mode can be created ???



what? that doesnt make any sense....
#4
Never mind - i'm new at all this codeing but i've worked it out :p Thanks for the reply anywho
#5
Does this plugin even work for anyone. I have it kicking people not even afk and leaving afk's in. I will post my server stats if it really is needed but I think this isnt working for alot of peolpe.
#6
any update on this pluggin please, it's not working on my server, Thanks
#7
Hey guys!

i just updated the AFK Manager to Version 0.8!

Please give it a chance again as i removed all unreliable
"detections" and updated the 100%ly reliable detections.

here's the change log, please let me know about problems
and bugs!

Code:
// // - 26.06.2007 Version 0.8 // - removed unneeded code // - removed unreliable afk-timer reset-functions // - added reset for throwing grenades // - added reset for changing class // - updated "team change function" to use dod_client_changeteam // forward // - changed to pcvar system // - optimized the code //
#8
FeuerSturm Wrote:Hey guys!

i just updated the AFK Manager to Version 0.8!

Wow, you are churning out new versions of your Plugins at a really astonishing rate! I hope your new Girlfriend get's enough attention, still Wink

Anyway, as soon as I verified the new Team Manager and TK Management, I'll definitely give this one a try.
#9
Well, at least with AMXX 1.76a (didn't update to "d" yet) I definitely have wrong kicks, still. A sniper got kicked in the middle of sniping... but he moved, not standing 100% still...

But then, in the code I can't see anything that rects to simply moving. So if you don't chat, kill, get killed, score flags - you just walk around, then you are counted as AFK... right?

Anything I can do to help debug? Maybe provide the 10 Minute HLTV Demo I took and some logfile entries, as well as the config?
#10
there are actually 2 problems:

1st problem:
a position check is unreliable, means if a player is really afk and standing
in his spawn and he gets TKed or blown up with an enemy grenade
his position on the map changes as well as it changes when the round
is won/lost and he respawns.
so i can neither check his position nor if he got wounded or killed as that can
happen without any interaction of the "afk" player.

2nd problem:
looking for a user moving is possible and reliable BUT will use a lot of
resources as the timer is reset everytime he presses a movement key,
so it would be like that for 5 seconds of walking around:
reset, reset, reset, reset, reset, reset, reset, reset, reset, reset, reset,
reset, reset, reset, reset, reset, reset, reset, reset, reset, reset, reset
and so on......

what i can add though is a check if he's having anything in his hands
that's not his primary gun. so if he changes his weapon to grenade or
spade/knife the time will be reset.
a check if he switches to his primary gun would be useless as that's called
when a player spawns as well.

but i still have two questions:
- what time are you using to kick afks?
- is a player really contributing to the game that doesn't really interact
and just moves around?


Forum Jump:


Users browsing this thread: 1 Guest(s)
DoD Plugins Archive · Repository · Return to Top · Current time: 08-28-2026, 04:01 AM Powered By MyBB, © 2002-2026 MyBB Group.