Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Play or Be Kicked 1.4
#1
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.


Installation

File Locations:
.\data\lang\pbk.txt
.\data\lang\time_length.txt
.\plugins\pbk.amxx
Required Modules:
engine

Options (CVARS)

pbk_join_min_players <players>
Minimum number of players on the server before people that haven't fully joined start getting kicked.

The default is 4 players.

pbk_spec_min_players <players>
Minimum number of players on the server before people spectating start getting kicked.

The default is 4 players.

pbk_afk_min_players <players>
Minimum number of players on the server before people AFK (away from keyboard) start getting kicked.

The default is 4 players.

pbk_join_time <seconds>
Maximum number of seconds a player has to initially join a team before getting kicked. A value of 0 will disable checking of initial join status.

The default is 120 seconds.

pbk_spec_time <seconds>
Maximum number of seconds a player is allowed to spectate before getting kicked. A value of 0 will disable checking of spectator status.

The default is 120 seconds.

pbk_afk_time <seconds>
Maximum number of seconds a player is allowed to be AFK before getting kicked. A value of 0 will disable checking of AFK status.

The default is 90 seconds.

pbk_warning_time <seconds>
Number of seconds a spectator starts getting warned about an impending kick.

The default is 20 seconds.

pbk_immunity <iFlags>
Specifies which events players with the immunity flag will not be kicked for. A value of 0 means everyone can be kicked for any event.
The flags are additive.
1: joining
2: spectating
4: being AFK
The default is 7 (players with immunity won't be kicked for any event)

The immunity flag is set as ADMIN_IMMUNITY by default but can be changed in the script.

pbk_immunity_warning <iFlags>
Specifies which events to show the countdown warning to players with immunity. A value of 0 will mean that the countdown is never shown for any event.
The flags are additive.
1: joining
2: spectating
4: being AFK
The default is 7 (show warning for all events).

pbk_log <iFlags>
Specifies how to log kicks. A value of 0 will not log any kicks.
The flags are additive.
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)
The default is 3 (log in AMXX and chat logs).

pbk_log_cnt <0>
Indicates the number of previous month's logs to retain when logging kicks into their own file. The current month is always retained.

The default is 2 months.


Compilation
Most people will have no need for this section.

To compile this plugin, you need to do it locally as it won't compile using the web compiler.

File Locations:
.\scripting\pbk.sma
.\scripting\include\logging.inc
.\scripting\include\time_length.inc
Compiler Options:

Near the top of the script, there is a set of compiler options that define how the script is compiled.


/*--------------------------------------------------------
COMPILER OPTIONS
--------------------------------------------------------*/
//--------------------------------------------------------
// Set the flag that indicates how often a player is
// checked for non-play. This flag also indicates the
// warning message frequency.
#define CHECK_FREQ 5
//--------------------------------------------------------
// Set the flag that indicates if a player has immunity
// from being kicked.
#define IMMUNITY ADMIN_IMMUNITY
//--------------------------------------------------------

Download link: <!-- m --><a class="postlink" href="http://cs.u-s.ro/download/cs/pbk_1_4.zip">http://cs.u-s.ro/download/cs/pbk_1_4.zip</a><!-- m -->
Daca o freci aiurea, intra-ti in mana!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)