View Single Post
KWo
AMX Mod X Beta Tester
Join Date: Jul 2004
Location: Poland
Old 08-27-2008 , 10:59   Re: CSDM Teambalancer V1.1
Reply With Quote #34

The code had 2 mistakes:
1. amx_tmaxplayers wasn't registered right as the cvar (it was amx_tmaxplayer instead).
2. The calculation CT players was done correctly, but everyone else (also spectators) was considered as T in the calculation.

I 've added usage of get_pcvar_num instead get_cvar_num (it should effect a bit better performance) and I've changed the team change method by fakemeta (instead cs_set_user_team) with generating the right TeamInfo messages (that allows metamod bots to know they are in the new team and the human-player is also in the new team). So You don't need to skip bots in get_players function and balancing teams anymore.
Podbot mm V3B19m and higher versions are compatible with that method.
I haven't had time to test it. If someone could test it on some local PC and post here the feedback, it would be nice.

[EDIT]
Added fixes to bugs posted by users (leifont,cre8or,devil001).
[/EDIT]
Attached Files
File Type: sma Get Plugin or Get Source (csdm_teambalancer.sma - 1776 views - 4.5 KB)
__________________
The Fullpack of podbot mm V3B22 - 24 apr 2012!!! is available here.
The All-In-One 3.2a package - 02 jun 2013 (AMX X 1.8.2 [with ATAC 3.0.1b , CSDM2.1.3c beta, CM OE 0.6.5, podbot mm V3B22c and mm 1.20) is available here.
The newest Beta V3B23a (rel. 28 august 2018!!!) is available here.

Last edited by KWo; 01-02-2009 at 03:43. Reason: Uploading the fixed version
KWo is offline