New Plugin, Anti-afk And Anti-stuck In One.
voogru
Naturally Modified (ex. NS programmer) Join Date: 2002-10-31 Member: 1827Members, Retired Developer, NS1 Playtester, Contributor, Constellation
<div class="IPBDescription">Yet another plugin... lol</div> I made another small plugin (has a few requests for this one) but its a basic system for kicker AFK'ers and a unexploitable "unstuck" feature.
How it works:
If a player doesnt move for 30 seconds, he is presented with a menu, asking him if he is stuck. if he says yes, then the plugin will move him either to the nearest command console or nearest hive (depending on what he is alien or marine) if he answers no nothing is done, but his idle time resets to 0 becuase he is obvoiusly there.
The cvar to control the time before a player is kicked is nsa_max_idletime, the cvar to control the delay between the stuck menu showing up is nsa_max_stucktime.
nsa_max_idletime is 180 by default.
nsa_max_stucktime is 30 by default.
The only thing, this plugin is not open source. no worries tho your players are not bombarded with connection messages.
Link: <a href='http://www.voogru.net/www/plugins/antiafk_mm.zip' target='_blank'>http://www.voogru.net/www/plugins/antiafk_mm.zip</a>
(its compiled for linux and windows)
- voogru.
How it works:
If a player doesnt move for 30 seconds, he is presented with a menu, asking him if he is stuck. if he says yes, then the plugin will move him either to the nearest command console or nearest hive (depending on what he is alien or marine) if he answers no nothing is done, but his idle time resets to 0 becuase he is obvoiusly there.
The cvar to control the time before a player is kicked is nsa_max_idletime, the cvar to control the delay between the stuck menu showing up is nsa_max_stucktime.
nsa_max_idletime is 180 by default.
nsa_max_stucktime is 30 by default.
The only thing, this plugin is not open source. no worries tho your players are not bombarded with connection messages.
Link: <a href='http://www.voogru.net/www/plugins/antiafk_mm.zip' target='_blank'>http://www.voogru.net/www/plugins/antiafk_mm.zip</a>
(its compiled for linux and windows)
- voogru.
Comments
<!--emo&::gorge::--><img src='http://www.unknownworlds.com/forums/html/emoticons/pudgy.gif' border='0' valign='absmiddle' alt='pudgy.gif'><!--endemo-->
(if enough people ask for the source ill just give up and give it out)
hook dispatchtouch, check distances of the origins, if they conflict, compute a x,y (since z seems to be up and down in hl) vector that would move the player away from the object at a 180 degree angle. do a traceline out a player unit (i assume it's like 32 for width), if it resolves without conflicts, do a a 5 direction traceline from there(since we already know #6 puts the guy back in the object he's stuck in), if it has a space for the player then do a teleport.
otherwise I think u could probably do a supercede on dispatchblock to let the player do a noclip effect on that one object (not quite sure how dispatchblock worx),
thank you for a well needed toy <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' valign='absmiddle' alt='smile.gif'><!--endemo-->
i got stuck just about 10 mins ago blinking into satcom and got stuck above the doorway in a light.
and umm.. bugging for open source.. there i bugged you. <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' valign='absmiddle' alt='smile.gif'><!--endemo-->
And w/NO menu, you can't preserve the CLOAK ability for aliens.
That's main reason for the menu. If your cloaked, you can still press 2; and avoid the kick; without moving.
EDIT: Added the checking of the players viewing angle in. Its a cvar as well.
From the readme:
nsa_check_angles allows you to check the players viewing angle, so if a player doesnt move but there looking around they wont be counted as idle, this may cause problems with getting stuck tho since players may look around a lot.
i will test in my server and give feedback if i got any problem
i played ns_eclipse as marine
* unstuck just stuck me near the comm station, sometimes just kill me, duno why
i think it need to change the point of the teleport
teehee
30 seconds of not moving at all, 30 seconds is a ETERNITY in NS, or in ANY mod for that matter <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink.gif' border='0' valign='absmiddle' alt='wink.gif'><!--endemo-->
Im gonna have an update that fixes some bugs in a bit.
Update: fixed the bug Nero was talking about for marines, it should work great now.
Also now, if a building is put where a player is going to be spawned it will be "killed", same if there is a player in the way. Just like the teledeath. this is so the stuck player doesnt get stuck once again into a building or a player.
'Because' is spelled wrong in the AFK kick, and there was another spelling error.. I don't remember it, though.
ROFL, And i ALWAYS misspell "because", its corrected now. lol
nope heh
Redownloaded it, after I read the bug fix post. Still does same thing.
Redownloaded it, after I read the bug fix post. Still does same thing.<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
works fine here.
Currently loaded plugins:
description stat pend file vers src load unlod
[ 1] Adminmod RUN - admin_MM_i386.so v2.50.50 ini Start Start
[ 2] NS Commander Mo RUN - bugfix.so v1.00.00 ini ANY ANY
[ 3] WebMod RUN - w_mm_i386.so v0.46 ini Start Never
[ 4] NS Anti-AFK RUN - antiafk_MM.so v1.00.00 ini Chlvl Chlvl
[ 5] NS StripEnt RUN - stripent_mm.so v1.00.00 ini Chlvl Chlvl
5 plugins, 5 running