AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Ptahhotep's Team Balancer 1.8b3 (Immunity & alive trans) (https://forums.alliedmods.net/showthread.php?t=26598)

lantz69 04-05-2006 09:57

Ptahhotep's Team Balancer 1.8b3 (Immunity & alive trans)
 
2 Attachment(s)
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

v3x 04-05-2006 10:18

Nice. This is the one I used not too long ago.

lantz69 04-05-2006 10:30

Quote:

Originally Posted by v3x
Nice. This is the one I used not too long ago.

Thank you very much v3x for approving this :D

Gunny 04-05-2006 11:28

lantz69, Thank YOU for keeping this plugin up to date.

AllMassive 04-05-2006 12:24

NICE - thx lantz

I LOVE those 2 new cvars-options:

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

:!: :!:

slurpycof 04-05-2006 13:00

Great job! Thank you for updating this.

Curryking 04-05-2006 14:10

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

Curry

Trip~Hazard 04-05-2006 14:37

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.

lantz69 04-05-2006 14:50

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

Trip~Hazard 04-06-2006 16:58

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.


All times are GMT -4. The time now is 01:42.

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