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

CSDM Teambalancer V1.1


Post New Thread Reply   
 
Thread Tools Display Modes
cre8or
Senior Member
Join Date: Apr 2005
Location: Sweden, Gothenburg
Old 06-30-2008 , 03:55   Re: CSDM Teambalancer V1.1
Reply With Quote #31

When there is 2 or more spectators it doesnt even up the players so it is same amount of players in each team. Atleast not on my server. But with no spectators it does.
Attached Thumbnails
Click image for larger version

Name:	namnlös.JPG
Views:	617
Size:	66.6 KB
ID:	28224  
__________________

Last edited by cre8or; 06-30-2008 at 03:57.
cre8or is offline
Send a message via ICQ to cre8or Send a message via MSN to cre8or
Richard
Member
Join Date: Apr 2008
Location: In the Counter Strike
Old 07-03-2008 , 13:09   Re: CSDM Teambalancer V1.1
Reply With Quote #32

Nice i go to test xD!
__________________
..._...|.._____________________, ,
....../ `–-___________–– ;_____|] = = = =
...../_==o;;;;;;;;_______.:/
.....), –-.(_(__) /
....// (..) ), ––"
...//___//
..//___//

[Richard]
Richard is offline
cre8or
Senior Member
Join Date: Apr 2005
Location: Sweden, Gothenburg
Old 07-30-2008 , 17:22   Re: CSDM Teambalancer V1.1
Reply With Quote #33

Is the project abandon ?
__________________
cre8or is offline
Send a message via ICQ to cre8or Send a message via MSN to cre8or
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 - 1772 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
leifont
Member
Join Date: Aug 2008
Old 09-11-2008 , 15:45   Re: CSDM Teambalancer V1.1
Reply With Quote #35

I was testing but I got the following message:

168:56: [AMXX] Run time error 10 (plugin "csdm_teambalancer.amxx") (native "get_pcvar_num")

__________________
Please be patient, my english is good.
good karma is accepted
leifont is offline
cre8or
Senior Member
Join Date: Apr 2005
Location: Sweden, Gothenburg
Old 09-21-2008 , 10:40   Re: CSDM Teambalancer V1.1
Reply With Quote #36

Quote:
Originally Posted by KWo View Post
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.
Ok, ill try it now and see if you managed to fix the problems


Edit:

I also got this error
L 09/21/2008 - 1653: [AMXX] Run time error 10 (plugin "csdm_teambalancer.amxx") (native "get_pcvar_num") - debug not enabled!
L 09/21/2008 - 1653: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).

debug:

L 09/21/2008 - 17:21:51: Start of error session.
L 09/21/2008 - 17:21:51: Info (map "gg_aim_ak-colt_2k7_v2") (file "addons/amxmodx/logs/error_20080921.log")
L 09/21/2008 - 17:21:51: Invalid CVAR pointer
L 09/21/2008 - 17:21:51: [AMXX] Displaying debug trace (plugin "csdm_teambalancer.amxx")
L 09/21/2008 - 17:21:51: [AMXX] Run time error 10: native error (native "get_pcvar_num")
L 09/21/2008 - 17:21:51: [AMXX] [0] csdm_teambalancer.sma::plugin_precache (line 53)
__________________

Last edited by cre8or; 09-21-2008 at 11:26. Reason: added errorstring
cre8or is offline
Send a message via ICQ to cre8or Send a message via MSN to cre8or
KWo
AMX Mod X Beta Tester
Join Date: Jul 2004
Location: Poland
Old 09-21-2008 , 11:45   Re: CSDM Teambalancer V1.1
Reply With Quote #37

OK - I've uploaded the plugin with the fixed version. Please try to download and test it once more.
__________________
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.
KWo is offline
cre8or
Senior Member
Join Date: Apr 2005
Location: Sweden, Gothenburg
Old 09-21-2008 , 12:25   Re: CSDM Teambalancer V1.1
Reply With Quote #38

Ok, will do that and thanks for your quick response

Edit: dont know if anythings wrong but no player is switched to other team
__________________

Last edited by cre8or; 09-21-2008 at 14:06.
cre8or is offline
Send a message via ICQ to cre8or Send a message via MSN to cre8or
cre8or
Senior Member
Join Date: Apr 2005
Location: Sweden, Gothenburg
Old 09-21-2008 , 14:27   Re: CSDM Teambalancer V1.1
Reply With Quote #39

Nope it wont transfer anyone...
__________________
cre8or is offline
Send a message via ICQ to cre8or Send a message via MSN to cre8or
leifont
Member
Join Date: Aug 2008
Old 09-24-2008 , 15:00   Re: CSDM Teambalancer V1.1
Reply With Quote #40

Quote:
Originally Posted by cre8or View Post
Edit: dont know if anythings wrong but no player is switched to other team
Same issue. Doesnt work.
__________________
Please be patient, my english is good.
good karma is accepted
leifont 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 10:38.


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