Raised This Month: $135 Target: $400
 33% 

AFK KiSSS (Kick/Slay/Spec-Switcher for CS) (with bombdrop)


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Server Management       
Isobold
Veteran Member
Join Date: Mar 2004
Old 06-20-2005 , 14:39   AFK KiSSS (Kick/Slay/Spec-Switcher for CS) (with bombdrop)
Reply With Quote #1

Code:
/*
 *
 *   Kick/Slay/Spec-Switcher for CS with bombdrop and name-changer
 *
 *
 *	based on AFK-Kicker by Cheesy Peteza
 *   Slay ability, Bomb drop, Specswitch and many other features added by Isobold (www.clan-nva.de)
 *   Code revision and some nice hints by juKay
 *	Date:		            02-Jul-2005
 *
 *
 *	Description:	AFK Slay/Kicker for CS. Kicks (switches to spec) after afk_kicktime and slays player
 *                                  if last surviver and afk and minimum afk_minplayers.
 *                                  Textmessage elsewhere
 *                  Drops bomb after 25 sec afk
 *                  AFK-Count-Message at roundstart
 *                  AFK-Players are renamed and get their old name back when playing again or being switched spec
 *                  (never the less their afk-name will show up during spectime)
 *                  Able to kick specs after a certain time
 *
 *	Cvars:
 *           afk_kicktime 150	 // Kick people AFK longer than this time
 *           afk_slaytime 60     // Slay people AFK longer than this time and last survivor
 *           afk_minplayers 8	 // Only kick AFKs when there is atleast this many players on the server
 *           afk_slayplayers 1   // Shall we slay or shall we not
 *           afk_adminimmunity 1 // Admins immun from slaying?
 *                               // Will show message anyway!
 *           afk_adminkickimmunity 1 // Admins immun from kicking
 *           afk_options 1       // 1 - Kick player after kicktime, 0 - switch to spec after kicktime
 *           afk_show_counter 0  // Set to 1, it will show the AFK-Counter from time to time
 *           afk_rename 1        // Set to 1, it renames AFK players as described above
 *                           Attention: Serious problems, don't use it yet, if you don't want to help testing
 *           afk_speckick 0      // Kicks specs after a certain time if set to 1
 *           afk_speckicktime 300 // time after which specs get kicked if not admin or recording a demo
 *
 *
 *	Requirements:	AMXModX (cstrike and engine-module required)
 *
 *
 */

Note: to keep CPU-Usage low AFK-Slay will only check in a five-seconds-frequency. It may take up to five seconds until slay so. U may lower this time by changing the following line before compile:
Code:
#define CHECK_FREQ 5        // in seconds. This is also the warning message frequency.

Note2: If you definitifly only want to kick players when afk, use: http://forums.alliedmods.net/showthread.php?p=2874, not this one.

Note3: Some parts of this plugin are configurable easily, but you may not want to change them after install. Thats why there is no cvar for them. To change them, you will have to change the following lines before compile:
Code:
#define BOMB_DROP_TIME 25       // Time until bomb gets dropped. #define SHOW_FREQ 20            // Frequence of afk-count-messages, only if STATUS_MSG is set to 1 #define SPEC_ASK_TIME 30        // Time until demo-menu will pop up ...

Note4: I merged wc3 and normal Version. This plugin now definitifly kills the user when time has come. Compatible with all kinds of cs-mods which are reviving players like wc3 does.

Note5: afkkicker2 is a well working old version. I f you encounter problems with the new one, plz step back to this version. Anyway I encourage you to use afkkisss.sma, I do so myself.

Install instructions:
  • * Read all the notes
    * Download the amxx-file by clicking on "get Plugin" (or the sma to edit it).
    * Download the txt-file
    * Put the amxx-file into the plugins folder of amxmodx
    * Put the txt-file into the data/lang folder of amxmodx
    * add a line "afkkisss.amxx ; this plugin slays and kicks afk players" into the config/plugins.ini of your amxmodx-installation
    * change map
    * Have fun ;-)

Configuring this plugin:
  • * Download the source code by clicking on download
    * open the file with an editor (not notepad, it needs to be able to read or convert unix line feeds)
    * edit the DEFINES you want to change
    * go to www.amxmodx.org, click on compiler and upload the edited file
    * install it as described above
    * edit your amxx.cfg and add the cvars you want to be set in a static way on each map change
    * to change cvars on your server type "amx_rcon [cvar] [value]" into the console (you need to be admin for this)
    * Have fun ;-)

Supported languages till now:
  • * english [en]
    * deutsch [de]
    * francais [fr]
    * swedish by juKay [sv]
    * dutch by godlike and proach [nl]
    * spanish by faluco [es]
    * danish by deagle [da]
    * turkish by deagle [tr]
    * polish by av [pl]
    * latvian by White_Eagle [lv]
    * Brazilian Portuguese by Rafeal [bp]
    * Bulgarian by CouN7eRSh!T [bg]


Attention: If you are updating from an earlier version don't forget to redownload the language files, too. There are improvments and the languagefile from version 1.5 and earlier is not compatible to pluginversion 1.6 and later...
The other way should work (new languagefile for an older version).
I do not maintain this addon any more. It is not outdated or so, and if you read the manual properly, it will work, but I simply do not have the time to read this forum since a year by now and this will most likely not change. If anyone is interested in taking it over, someone with some coding experience, I will agree to that. My profile has a valid email address, so ask a mod if you are interested. [02.08.2008]


Thx to all users of my plugin for testing and bug reporting. Without you I would already have stopped the developpment of this plugin since version 1.1.
Attached Files
File Type: sma Get Plugin or Get Source (afkkicker2.sma - 28447 views - 17.9 KB)
File Type: sma Get Plugin or Get Source (afkkisss.sma - 24106 views - 16.6 KB)
File Type: txt afkkicker.txt (4.6 KB, 10926 views)

Last edited by Isobold; 08-01-2008 at 23:29.
Isobold is offline
Isobold
Veteran Member
Join Date: Mar 2004
Old 06-20-2005 , 19:17  
Reply With Quote #2

Changelog
Changelog 1.0:
First release, static slay ability

Changelog 1.1
new cvar: afk_kicktime -- cvar changed name
new cvar: afk_minplayers -- cvar changed name
new cvar: afk_slaytime -- new cvar
new cvar: afk_slayplayers -- new cvar
new cvar: afk_adminimmunity --new cvar
Read man to know what the cvars are for.

Changelog 1.2:
Mulitlingualsupport added...

Changelog 1.3:
Explodesound on slay added... (and removed now)

Changelog 1.4:
new cvar: afk_adminkickimmunity -- new cvar

Changelog 1.5:
Bombdrop added: AFK-Players are dropping bomb when afk for more then 25 seconds...

Changelog 1.6:
You may now switch afk to spec instead of kicking.
new cvar: afk_options -- new cvar
1 - Kick player after kicktime, 0 - switch to spec after kicktime

Changelog 1.6.1:
- bugfix on spec switch

Changelog 1.6.2:
- All txt-messages are starting now with [AFK KiSSS]

Changelog 2.0.1:
- Complete Code revised and partially rewritten...
- AFK-Count with a message at round start
- Code optimized and debugged.
- Plugin tested for more than 3 hours on our clan-server, works perfectly...
Seems not to throw errors anymore...

Changelog 2.0.2:
- Bugfix for wc3-mod

Changelog 2.0.3:
new cvar: afk_show_counter -- new cvar
If set to 1, it will show the AFK-Counter-Msg every "#define SHOW_FREQ 20" seconds (change this line, to make it show more or less often).

Changelog 2.1.0:
Improved afk-detection alg. - now distinguishes between an afk-player who has an autoturn script and a hardcore camper, not moving but turning his head. Upgrade is highly recommanded to all AFK-KiSSS Users.

Changelog 2.1.1:
- Bugfix on rejoin from specswitch

Changelog 2.1.1 - wc3-release:
- intermediate release for wc3-users

Changelog 2.1.2:
- rejoin of wc3 and normal version

Changelog 2.1.3:
- Bugfix

Changelog 2.1.4:
- reseperated wc3 and normasl version due to some runtime errors (nothing dramatic, but not nice to see)

Changelog 2.2.0:
I now definitifly merged the wc3 and the normal branch. The plugin is now checking every 0,5 seconds if player is really dead after slay until he is, but stops checking on new round. This shall enshure that no "zombies" may exist.

Changelog 2.3.0:
new cvar: afk_rename -- new cvar
It lets the plugin rename AFK-Players during their afk-time.

Changelog 2.4.0:
new cvar: afk_speckick -- new cvar
new cvar: afk_speckicktime -- new cvar
Plugin is now able to kick spectators after a certain time.

Changelog 2.4.1:
- Bugfix in rename function

Changelog 2.4.2:
- Tweaks

Changelog 2.4.3:
- Bugfix in speckick function

Changelog 2.4.4:
- Bugfix in rename function

Changelog 2.4.5:
- Bugfix in rename function

Changelog 2.5.0:
- some important bugfixes and tweaks

Changelog 2.5.1:
- some important bugfixes and tweaks

Changelog 3.0:
- release of version three, complete rewrite from scratch, file now called afk_kisss.sma


I saw this on other servers (afk slay), but I could not find it for amxx, so I codet the slay function myself.

This plugin is based on Generic AFK Kicker, but it only works for CS, as other HL-mods are often not roundbased.

Last edited by Isobold; 01-04-2007 at 18:46.
Isobold is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 06-21-2005 , 06:41  
Reply With Quote #3

Is this the one like in NS?
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Isobold
Veteran Member
Join Date: Mar 2004
Old 06-21-2005 , 07:39  
Reply With Quote #4

Don't know, I never played NS...

It's the one u find on several CS-Servers, but unavailable before for amxx. It slays Players who did no move since 30 secs when any other player in the same team is dead.

After a several time it kicks these players...

In CS long roundtimes due to afk-players suck. This plugin lets the round end, when all active players in the same team are dead.


Note: to keep CPU-Usage low AFK-Slay will only check in a five-seconds-frequency. It may take up to five seconds until slay so. U may lower this time by changing the following line before compile:
Code:
#define CHECK_FREQ 5        // in seconds. This is also the warning message frequency.
Isobold is offline
Isobold
Veteran Member
Join Date: Mar 2004
Old 06-21-2005 , 17:49  
Reply With Quote #5

File updated. Plugin will now slay after 90 secs of inaktivity and only if at least mp_afkminplayers are playing. If not, plugin will only send a textmessage to all players.

This shall prevend the server from restarting round every 5 secs. when only 1,2 or 3 players are on the sever and afk, probably chatting togehter...

Plugin tested on my server and working fine.

How about approving it ?
Isobold is offline
juKay
Member
Join Date: Mar 2004
Location: Sweden
Old 06-25-2005 , 21:56  
Reply With Quote #6

Added some features that I needed:
  • Changed the mp_ cvars into afk_ (In my opinion only orginal cvars should have mp_ names)
  • Added cvar afk_slayplayers - You can now turn the slay feature on and off
  • Added cvar afk_adminimmunity - If set to 1 the ADMIN_IMMUNITY flag is honored and admins will not be slayed or kicked.

Have not tested it very much, also made some small changes before this post so there might be bugs
Attached Files
File Type: sma Get Plugin or Get Source (afkkicker.sma - 2335 views - 5.1 KB)
juKay is offline
Isobold
Veteran Member
Join Date: Mar 2004
Old 06-26-2005 , 07:50  
Reply With Quote #7

Released version 1.1 (approved version, thx to "Jonny got his gun")

I implemented the ideas from juKay, but I rewrote the code on my own (implemented it with less cpu-usage needed in most cases).


ATTENTION: ALL CVARS CHANGED NAME. juKay was right with his suggestion about mp_cvars. I took the same names as juKay, only afk_time was to bad, I choosed afk_kicktime as there is also afk_slaytime in my version.

Some additional cvars.


Changelog 1.1

afk_kicktime -- cvar changed name
afk_minplayers -- cvar changed name

afk_slaytime -- new cvar
afk_slayplayers -- new cvar
afk_adminimmunity --new cvar

Read man to know what the cvars are for.


These cvars shall give you the possibility to configure this plugin differently for each map.


Changelog 1.2

Mulitlingualsupport added...


Changelog 1.3

Explodesound on slay added...
Isobold is offline
Isobold
Veteran Member
Join Date: Mar 2004
Old 06-26-2005 , 10:05  
Reply With Quote #8

if you had a problem with a version downloaded within the last 15 min, sorry about that, I released a version working 100% fine on my server but with a little bug on slay...

Plz redownload the amxx-file to fix it...
Isobold is offline
juKay
Member
Join Date: Mar 2004
Location: Sweden
Old 06-26-2005 , 10:10  
Reply With Quote #9

Here you have swedish language:
Code:
[sv]
AFK_INFO_MSG = "Alla kvarvarande spelare 'a'r AFK!"
AFK_KILL_MSG = "%s blev d'o'dad f'o'r att vara AFK och den sista levande spelaren."
AFK_TIMELEFT = "Du har %i sekunder pa dig att r'o'ra dig, annars blir du sparkad f'o'r att du 'a'r AFK."
AFK_KICKED   = "%s blev sparkad f'o'r att ha varit AFK l'a'ngre 'a'n %i sekunder."
juKay is offline
Isobold
Veteran Member
Join Date: Mar 2004
Old 06-26-2005 , 10:25  
Reply With Quote #10

Thx man, and another stupid bug fixed. Should be bugclean now...
Isobold 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 20:19.


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