Raised This Month: $198 Target: $400
 49% 

Play or Be Kicked 1.5.243


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Server Management        Approver:   devicenull (200)
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 07-10-2005 , 00:19   Play or Be Kicked 1.5.243
Reply With Quote #1

Play or Be Kicked 1.5.243 released 2008-JUL-23

This plugin has the ability to kick players based on any of the following three events:
  • not joining a team or spectator mode in time when initially joining the server
  • spectatating too long
  • being AFK too long
Which events your server looks for is configurable as is the amount of time allowed for each event.


Table of Contents

Support
Options (CVARS)
Compilation
Installation
Installation Files
Notes
Change Log
Credits
Previous Versions (unsupported)


Support
top

You can receive support for this plugin within this thread. Non-Steam servers are not supported.


If you are posting in this thread because the plugin or a feature of the plugin isn't working for you, please do all of the following so that we can more efficiently figure out what's going on:

Quote:
If you have access to your game server's console, type the following in the server console:
  • status
  • meta list
  • amxx plugins
  • amxx cvars
If you don't have access the your game server's console, join your server and type the following in your game console:
  • status
  • rcon_password your_rcon_password
  • rcon meta list
  • rcon amxx plugins
  • rcon amxx cvars
Paste everything from the status command *except* the player list.
Paste the entire result from the meta list and amxx plugins commands.
Paste *only* the CVARs that contain "pbk.amxx" in the last column from the amxx cvars command. They will be grouped together.

Options (CVARs)

top

Code:
// Play or Be Kicked Configuration File
echo Executing Play or Be Kicked (PBK) Configuration File


////////////////////////////////////////////////////////////////////////
// The 'join' event, as defined by this plugin, is the time between   //
// when a player connects to the server and when the player chooses   //
// their model, thus entering the game.  Normally, a player can sit   //
// in this event indefinitely, thus taking up a slot in your server.  //
////////////////////////////////////////////////////////////////////////

// Specifies the the minimum number of players on the server before 
// people that haven't fully joined start getting kicked.
pbk_join_min_players 4

// Specifies the number of seconds a player has, after connecting to 
// the server, to join a team before getting kicked.
// A value of 0 will disable checking of this event.
pbk_join_time 120

// Specifies the access level flags needed for a player to have 
// immunity for the 'join' event.  Having immunity means the player 
// would not get kicked for failing to join a team.
// 
// Set this CVAR to blank to disallow immunity.
//    
// For available flags,
// http://wiki.amxmodx.org/index.php/Ad...#Access_Levels
//            
// A common value, when admin immunity is desired, is to use the 
// "a" flag (ADMIN_IMMUNITY).
pbk_join_immunity_flags ""


////////////////////////////////////////////////////////////////////////
// The 'spec' event, as defined by this plugin, is the time in which  //
// a player is in spectator mode.  Normally, a player can sit in this //
// mode indefinitely, thus taking up a slot in your server.           //
////////////////////////////////////////////////////////////////////////

// Specifies the the minimum number of players on the server before 
// people that are in spectator mode start getting kicked.
pbk_spec_min_players 4

// Specifies the total number of seconds a player can be in spectator
// mode before they get kicked.
// A value of 0 will disable checking of this event.
pbk_spec_time 120

// Specifies the access level flags needed for a player to have 
// immunity for the 'spec' event.  Having immunity means the player 
// would not get kicked for being in spectator mode too long.
// 
// Set this CVAR to blank to disallow immunity.
//    
// For available flags,
// http://wiki.amxmodx.org/index.php/Ad...#Access_Levels
//            
// A common value, when admin immunity is desired, is to use the 
// "a" flag (ADMIN_IMMUNITY).
pbk_spec_immunity_flags ""

// Indicates whether spectators are queried periodically, in an effort 
// to determine if they are in front of the keyboard or not.
pbk_spec_query 0


////////////////////////////////////////////////////////////////////////
// The 'AFK' event, as defined by this plugin, is when a player has   //
// not moved in a defined period of time.  Normally, a player can be  //
// AFK indefinitely, thus taking up a slot in your server.            //
////////////////////////////////////////////////////////////////////////

// Specifies the the minimum number of players on the server before 
// people that are AFK start getting kicked.
pbk_afk_min_players 4

// Specifies the number of seconds a player can be AFK before 
// getting kicked.
// A value of 0 will disable checking of this event.
pbk_afk_time 120

// Specifies the access level flags needed for a player to have 
// immunity for the 'afk' event.  Having immunity means the player 
// would not get kicked for being AFK too long.
// 
// Set this CVAR to blank to disallow immunity.
//    
// For available flags,
// http://wiki.amxmodx.org/index.php/Ad...#Access_Levels
//            
// A common value, when admin immunity is desired, is to use the 
// "a" flag (ADMIN_IMMUNITY).
pbk_afk_immunity_flags ""


////////////////////////////////////////////////////////////////////////
// As a courtesy to any player about to be kicked, a chat message     //
// will let them know of their impending kick every 5 seconds until   //
// they are kicked.                                                   //
////////////////////////////////////////////////////////////////////////

// Specifies the number of seconds a player starts getting warned before
// they are kicked.
pbk_warning_time 20

// Specifies which events to show the countdown warning for to players 
// with immunity.
//
// The flags are additive. A value of 0 indicates that the countdown is
// not shown for any event.
//
// 1 - joining
// 2 - spectating
// 4 - being AFK
pbk_immunity_warning 7


////////////////////////////////////////////////////////////////////////
// Sometimes you just want to know what's been happening and when.    //
// Logging the kicks from this plugin is an easy way to help          //
// accomplish that.                                                   //
////////////////////////////////////////////////////////////////////////
        
// Indicates how to log kicks.  
// The flags are addtive. A value of 0 will not log any kicks.
// 
// 1 - log in the AMXX log
// 2 - log in the chat log (allows kicks to be seen in programs like 
//     HLSW that show you the chat log)
// 4 - log in their own file ("pbkMM.log" where "MM" is the 
//     two-digit month)
pbk_log 3

// Specifies the number of previous month's logs to retain. 
// The current month is always retained.
pbk_log_cnt 2


////////////////////////////////////////////////////////////////////////
// When you run multiple servers, sometimes, instead of kicking       //
// players into the nether, you would like to kick them over to one   //
// of your other servers.                                             //
////////////////////////////////////////////////////////////////////////

// Specifies the IP to which kicked users should be sent.
// A blank value disables this feature.
pbk_kick2_ip ""

// Specifies the port to which kicked users should be sent.
pbk_kick2_port "27015"

Compilation

top
This plugin *must* be compiled locally, as it uses a custom include file.

File Locations:
  • .\scripting\pbk.sma
  • .\scripting\includes\logging.inc

Installation

top

File Locations:
  • .configs\pbk.cfg
  • .\data\lang\pbk.txt
  • .\plugins\pbk.amxx
Required Modules:
  • fakemeta

Installation Files

top
Attached Files
File Type: sma Get Plugin or Get Source (pbk.sma - 18702 views - 14.9 KB)
File Type: cfg pbk.cfg (6.0 KB, 9489 views)
File Type: txt pbk.txt (8.5 KB, 9597 views)
File Type: inc logging.inc (2.8 KB, 7876 views)

Last edited by Brad; 02-13-2010 at 10:00. Reason: added compilation information
Brad is offline
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 07-10-2005 , 00:19  
Reply With Quote #2

Notes
top

Compatibility:

AMXX 1.8 or higher only.

Language Translations:

If you have a set of new translations or updates to existing translations, please post them in the sister thread to this one: Play or Be Kicked (current translations)

Immunity:

Immune players that are spectating can optionally get a count-down as if they were going to be kicked. This is useful in case you don't want other players on the server to realize who is admin (seeing someone spectate for hours while others are kicked after minutes is a dead giveaway) so by seeing the countdown, the admin can know when to scurry back onto a team without raising too much suspicion.


Change Log
top

[2008-JUL-23] v1.5.243
  • Removed all vestiges of the engine module and used fakemeta instead.
  • Optimized various portions of code to be more efficient.
  • No longer comparing Z-axis to see if a player moved. This fixes an issue where players' AFK meters could get reset upon round start if you had a low (2 seconds or less) freeze time. Also fixes an issue on maps where players can be constantly moving along the Z-axis, even when AFK (for example, ka_bungee).
  • Replaced "pbk_immunity" with three new CVARs: "pbk_spec_immunity_flags", "pbk_afk_immunity_flags", and "pbk_join_immunity_flags". Allows you to set one or more flags that should have immunity from each kick event.
  • Added plugin-specific config file, "pbk.cfg".
  • Added ability to redirect players to a different server upon kicking them. Uses the new CVARs, "pbk_kick2_ip" and "pbk_kick2_port".
  • Implemented optional feature whereas, if this plugin detects someone in spectator mode, and the plugin is configured to kick for too much time in spectator mode, it can periodically query the player to see if they're actually at the keyboard or not.
[2005-DEC-11] v1.4
  • Fixed inconsistencies between what the docs said the default values for certain CVARs were and what they were set as in the code. The docs were correct, the code was wrong.
  • Replaced "pbk_min_players" with three new CVARs: "pbk_join_min_players", "pbk_spec_min_players", and "pbk_afk_min_players". This allows you to have finer control over when players should be kicked.
[2005-NOV-11] v1.3
  • Compatible with AMXX 1.60 or higher only.
  • [NEW] Added functionality to kick AFK users via new CVAR "pbk_afk_time". A value of 0 will disable checking of AFK status.
  • [NEW] Added CVAR "pbk_immunity_warning" to indicate whether players with immunity should be shown the warning countdown. The default is to show the countdown.
  • [ENH] Added CVAR "pbk_log" which lets you specify how to log kicks. Options are to log in the AMXX log (as was previously done), the chat log (allows kicks to be seen in programs like HLSW that show you the chat log), and in their own file (pbkMM.log where MM is the two-digit month). The default is to log in the AMXX and chat logs.
  • [ENH] Added CVAR "pbk_log_cnt" which lets you specify how many months of logs to keep if you are logging kicks into their own file.
  • [ENH] Renamed CVAR "pbk_un_time" to "pbk_join_time". Added the ability to specify 0 to disable checking of initial join status.
  • [ENH] Added ability to specify 0 for the "pbk_spec_time" CVAR to disable checking of spectator status.
  • [ENH] Changed the options for "pbk_immunity" to allow indication of what events an immune player can be immune from being kicked. Options are "joining", "spectating", and "being AFK".
  • [BUG] Fixed issue where player would be able to choose a team but not a model and then sit there indefinitely.
  • [BUG] Fixed issue where the time length wasn't multilingual.
  • [CHG] Renamed CVAR "pbk_allow_immunity" to "pbk_immunity".
  • [CHG] Removed CVAR "pbk_restrict". Functionality that it provided is now being provided via "pbk_join_time", "pbk_spec_time", and pbk_afk_time".
[2005-JUL-16] v1.1
  • Will ignore HLTV users.
  • Added CVAR to allow immune players to be kicked.
  • Replaced CVAR "pbk_time" with "pbk_spec_time" and "pbk_un_time". Allows different times to be set for each event.
[2005-JUL-10] v1.0
  • Initial release.

Credits

top

Idea for the plugin came from frustrations with Spec Kick by foo.bar.
Original design inspiration and some code came from Generic AFK Kicker by CheesyPeteza.

Specific Features:
  • "Immunity warning option" thanks to Curryking.
  • "Choose team but not class bug" thanks to docjohnson.
  • "Will ignore HLTV users" thanks to onedamage.
  • "Allow players with immunity to be kicked" thanks to AllMassive.
  • "Allow min player settings per event" thanks to Schlesie.
Language Translations:
Previous Versions (unsupported)

top
Attached Files
File Type: zip pbk_1_4.zip (9.0 KB, 2298 views)

Last edited by Brad; 07-23-2008 at 10:01.
Brad is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 07-10-2005 , 00:50  
Reply With Quote #3

Nice, I like this!
__________________
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
juKay
Member
Join Date: Mar 2004
Location: Sweden
Old 07-10-2005 , 07:40  
Reply With Quote #4

Switched to this plugin too.

Another nice feature I would like is to have a menu pop up and asking if they are recording a demo.
juKay is offline
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 07-10-2005 , 10:39  
Reply With Quote #5

@ v3x:
Thanks! It's my first "official" plugin and I was aiming for something that was very configurable, did it's stated purpose well, and contained no bugs.

@ juKay:
Quote:
Originally Posted by juKay
Another nice feature I would like is to have a menu pop up and asking if they are recording a demo.
You would have a menu pop up and if they indicate they ARE recording a demo, you wouldn't kick them?

Assuming that was what you were going for, I don't think it's feasible in the sense that if someone is spectating too long and they're not recording a demo, why wouldn't they just say they are so that they won't get kicked? It'd be too open to abuse, in my opinion.

@ Whoever voted the plugin 'broken':
If you're going to vote something as "broken", and you really believe it is 'broken' , please do us all a favor and let us know what is broken so it can be fixed.
Brad is offline
juKay
Member
Join Date: Mar 2004
Location: Sweden
Old 07-10-2005 , 12:34  
Reply With Quote #6

Quote:
Originally Posted by Khoralt
Assuming that was what you were going for, I don't think it's feasible in the sense that if someone is spectating too long and they're not recording a demo, why wouldn't they just say they are so that they won't get kicked? It'd be too open to abuse, in my opinion.
You still need to be in front of the box to select something in the menu.
juKay is offline
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 07-10-2005 , 13:26  
Reply With Quote #7

Nice Nice
__________________
hello, i am pm
PM is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 07-10-2005 , 15:16  
Reply With Quote #8

Quote:
Originally Posted by juKay
Switched to this plugin too.

Another nice feature I would like is to have a menu pop up and asking if they are recording a demo.
Hook the "record" command.. Use vars and what not.. ;)
__________________
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
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 07-10-2005 , 17:30  
Reply With Quote #9

Here is the dutch translation you have asked for. I made it quick so maybe there are a few mistakes in it but i dont think so. please lemme know (I am tired gonna take a nap)
Attached Files
File Type: txt dutch_pbk.txt (430 Bytes, 634 views)
__________________
hello, i am pm
PM is offline
Gunny
Senior Member
Join Date: Mar 2004
Location: Magnolia, Texas
Old 07-10-2005 , 20:26  
Reply With Quote #10

This is what I have wanted. I get so tired of players sitting in Spec mode.

Putting it on my servers now!!!


Thanks
__________________
TEAM FORTRESS 2 - 70.85.30.25:27015
COUNTER-STRIKE SOURCE - 70.85.30.22:27015
COUNTER-STRIKE SOURCE DEATH MATCH - 70.85.30.23:27015
Gunny 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 08:55.


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