Raised This Month: $51 Target: $400
 12% 

Ptahhotep's Team Balancer 1.8b3 (Immunity & alive trans)


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Server Management        Approver:   v3x (159)
lantz69
AMX Mod X Beta Tester
Join Date: Mar 2004
Location: Sweden, Skåne
Old 04-05-2006 , 09:57   Ptahhotep's Team Balancer 1.8b3 (Immunity & alive trans)
Reply With Quote #1

Ptahhotep's Team Balancer 1.8b3

NOTE!!!
Amxmodx 1.70 or higher is required as this version uses the new autochanneling system for hudmessages

Features
Immunity for admins (Controlled by CVARS)
Transfers player alive without killing them.
Weapons and equipment aren't lost in transfers.
Immunity for the VIP in as_* maps

Changelog & Credits
Code:
* Ptahhotep's Team Balancer (PTB)
* Version 1.8b3
* ORIGINAL AUTHOR: Ptahhotep ([email protected])
* CURRENT Support of the plugin: LAntz69 (IRC #amxmodx @Gamesurge or #vanilla.se @Quakenet)
*
* 1.8b3 lantz69: 2007-03-08
- Fixed so you can have mp_roundtime to almost whatever you want and PTB will still work.
* Before PTB did not work if you had mp_roundtime set to 2.10 or 1.75 etc It had to be 1.5, 2.0, 2.5 etc
- Added log_message to hlds logs when a player is transfered (player X joined team ..) for PsychoStats 3.X
- Changed the time player is transfered from 4.0 to 4.5 seconds
- Added cvar ptb_immunity_level so you dont need to recompile to change the admin flag for immunity
- Added cvar ptb_access_level so you dont need to recompile to change the admin flag for access to ptb
- Added cvar ptb_show_in_hlsw If you want to see Transfers made in the HLSW chat have this set to 1
- Added the above cvars into ptb.cfg ptb_immunity_level, ptb_show_in_hlsw and ptb_access_level
- Made all cvars use the new pcvars system.
- Added protection for VIP to be transfered (Uncomment #define PTB_VIP_IMMUNITY in the source for this to work)
 
* 1.8b2 lantz69: 2006-08-03
- If player has defuse kit before a transfer it will be removed (thx teame06)
- Added compile option #define SHOW_IN_HLSW To be able to remove transfers being showed in HLSW chat (Sug. Brad)
 
*  1.8b1 lantz69: 2006-04-05
- ptb.cfg is now back in addons/amxmodx/configs/
- wtj.log is now in addons/amxmodx/logs/
- using amxmodx function floatabs
- added amxmodx 1.70 autochanneling for hud messages
- admins with kick flag is able to join spec even if autojoin is enabled
- new cvars ptb_switch_immunity and ptb_limitjoin_immunity. (in ptb.cfg)
  Now it's easy to disable admins immunity.
 
*  1.7b9.3 lantz69: 2006-01-12
- small fix for client_prints.
*  1.7b9.2 lantz69: 2005-10-03
- changed how players are transfered and cleaned up the code.
- Players are now transfered without being killed and they also keep their weapons
- lastRoundSwitched[id] is also updated at transfers. Before the amx_ptb playerfreq was broken
*  1.7b3   PTB converted for AMX Mod by OLO
*  1.7b5   Modified for CS 1.6 by XAD.
*          Thanks Redmist ("slot1" to close old-style-menus).
*          Added fix by 'Panzermensh' for lost kill when moved
*          (thanks r0otd0wn).
*  1.7b6   Ported to AMX Mod X 0.16 by XAD.
*          Changed config file path to configs/ptb.cfg
*  1.7b7   Added admin immunity by Ingerfara. (Thanks to EpsychE and rootdown)
*  1.7b8   JGHG: changed the path of ptb.cfg to use AMXx's default custom path.


Compiler options in the ptb.sma line 58
This is for the VIP immunity
// Uncomment for support immunity on VIP
//#define PTB_VIP_IMMUNITY




CVARS (All are in configs/ptb.cfg)
ptb_saychat <0|1|2|3>
0 for disabling all ptb chat messages
1 for enabling all ptb chat messages (Default)
2 Transfers will show as hudmessage and in chat
3 Shows all messages in chat and transfers in hudtext

ptb_transfer_type <1|2|3>
1 PTBs original transfertype (Default)
2 a little more agressive than 1
3 the most agressive transfer
Quote:
Originally Posted by Explaination for agressive transfer
With more aggressive transfers it transfers one player to the other team rather than just swithing 2 players.
This makes the losing team get one more player and the winning team 1 less.
The default setting almost always swith 2 players and almost always doesn't do any effect to balance the team.
ptb_switch_immunity <0|1>
0 admins with immunity will be switched.
1 admins with immunity will be protected from switches. (Default)

ptb_limitjoin_immunity <0|1>
0 admins with immunity will not be able to choose any team they want.
1 admins with immunity can choose any team they want. (Default)

ptb_immunity_level "o"
Here you set which flag an admin must have to be immune against transfers (Default o ADMIN_LEVEL_C)

ptb_access_level "l"
Here you set which flag an admin must have to be able to change PTB settings (Default l ADMIN_RCON)

ptb_show_in_hlsw <0|1>
If you want to see Transfers made in the HLSW chat have this set to 1

Installation instructions
1. Copy the new ptb.cfg to addons/amxmodx/configs/
2. Copy ptb.sma to addons/amxmodx/scripting/ and compile it
3. Copy the compiled file ptb.amxx from the compiled folder to the plugins folder.
4. Add a line ptb.amxx to your amxmodx plugins.ini

5. Edit ptb.cfg to suit your needs (Good settings for a 20 player server):
Code:
amx_ptb maxsize      11  // maximum team size per team 
amx_ptb maxdiff      2  // maximum team size difference
or maybe
Code:
amx_ptb maxsize      12  // maximum team size per team 
amx_ptb maxdiff      4  // maximum team size difference
The forumla to make it fit your server:
amx_ptb maxsize should be set at maxplayers/2 + amx_ptb maxdiff/2
NOTE: Certain maps like nuke,train, militia and italy only has 10 spawns/team.

6. Enable the required module cstrike in modules.ini or PTB wont load properly


DONE

Good Luck!

***** TODO *****
Make it MultiLingual (50% done)

ptb.sma 1.8b1 was downloaded 1297 times
ptb_1.8b1.zip was downloaded 2070 times
---
ptb.sma 1.8b2 was downloaded 1464 times
ptb_1.8b2.zip was downloaded 4277 times
Attached Files
File Type: zip ptb-1.8b3.zip (52.1 KB, 47135 views)
File Type: sma Get Plugin or Get Source (ptb.sma - 36113 views - 47.3 KB)
__________________
Using: Amxmodx 1.8.1.xxxx, cstrike
http://www.vanilla.se/

Last edited by lantz69; 03-10-2007 at 06:34. Reason: Updating plugin
lantz69 is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 04-05-2006 , 10:18  
Reply With Quote #2

Nice. This is the one I used not too long ago.
__________________
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
lantz69
AMX Mod X Beta Tester
Join Date: Mar 2004
Location: Sweden, Skåne
Old 04-05-2006 , 10:30  
Reply With Quote #3

Quote:
Originally Posted by v3x
Nice. This is the one I used not too long ago.
Thank you very much v3x for approving this
__________________
Using: Amxmodx 1.8.1.xxxx, cstrike
http://www.vanilla.se/
lantz69 is offline
Gunny
Senior Member
Join Date: Mar 2004
Location: Magnolia, Texas
Old 04-05-2006 , 11:28  
Reply With Quote #4

lantz69, Thank YOU for keeping this plugin up to date.
__________________
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
AllMassive
Senior Member
Join Date: Sep 2004
Location: /dev/urandom
Old 04-05-2006 , 12:24  
Reply With Quote #5

NICE - thx lantz

I LOVE those 2 new cvars-options:

ptb_switch_immunity <0|1>
ptb_limitjoin_immunity <0|1>

AllMassive is offline
slurpycof
Senior Member
Join Date: Nov 2004
Old 04-05-2006 , 13:00  
Reply With Quote #6

Great job! Thank you for updating this.
slurpycof is offline
Curryking
Veteran Member
Join Date: Jun 2004
Location: 51.22°N / 6.77°E
Old 04-05-2006 , 14:10  
Reply With Quote #7

Glad to see that you will maintain this great plugin. Many thanks lantz69!

Curry
__________________
Full speed - no brakes!
Curryking is offline
Trip~Hazard
Senior Member
Join Date: Jun 2004
Location: North Carolina
Old 04-05-2006 , 14:37  
Reply With Quote #8

Regarding ptb_transfer_type, can anyone describe more aggressive transfer? How would this perform vs. default? Basically what does it do that is different from before.
__________________
Trip~Hazard is offline
lantz69
AMX Mod X Beta Tester
Join Date: Mar 2004
Location: Sweden, Skåne
Old 04-05-2006 , 14:50  
Reply With Quote #9

Quote:
Originally Posted by Trip~Hazard
Regarding ptb_transfer_type, can anyone describe more aggressive transfer? How would this perform vs. default? Basically what does it do that is different from before.
With more aggressive transfers it transfers one player to the other team rather than just swithing 2 players.
This makes the losing team get one more player and the winning team 1 less.
The default setting almost always swith 2 players and almost always doesn't do any effect to balance the team.

I use ptb_transfer_type 3 on my own server.

Hope that explains it
__________________
Using: Amxmodx 1.8.1.xxxx, cstrike
http://www.vanilla.se/
lantz69 is offline
Trip~Hazard
Senior Member
Join Date: Jun 2004
Location: North Carolina
Old 04-06-2006 , 16:58  
Reply With Quote #10

Thx Lantz and that does help. A few people observed something last night and I wanted to let you know: when PTB decided to switch a live player, the process would start about 1-2 seconds before actual round end. Several people indicated they saw a person change from a CT to a T just before round end....giving in some cases enough time for a CT to kill the switched player who just found themselves amongst enemies and not even know it . Most of the time it happened too fast to be an issue, but there is apparently room for it to cause a problem at some point if there is time for you to observe the player morphing to another team. I personally never got a chance to see it, but some of my admins did.
__________________
Trip~Hazard is offline
Reply



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 18:27.


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