This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Auto Team Balance on Round End


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands       
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 01-14-2009 , 08:34   Auto Team Balance on Round End
Reply With Quote #1

This is a simple, minimal plugin that aims to do the same as what happens when "mp_autoteambalance" equals to "1" but at the end of every round, since the default "Auto team balance" waits one round to happen, what is annoying for me. Anyway, i made this plugin to fit my needs. If you find one that does better than mine, use it. Here it goes.

Cvars:

atbre_enabled - 0 disabled, 1 enabled
atbre_chat - 0 no chat messages, 1 chat messages as defined in the line: #define CHAT_MESSAGE "Player %s was transfered"
atbre_ignore_atb - // 0 - Transfers happen if mp_autoteambalance=1, 1 - Transfers happen independently of mp_autoteambalance value

Last edited by joaquimandrade; 03-06-2009 at 20:21.
joaquimandrade is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-14-2009 , 08:47   Re: Auto Team Balance on Round End
Reply With Quote #2

Is not already done here ?
Arkshine is offline
bomnacama
Senior Member
Join Date: Dec 2008
Location: Portugal
Old 01-14-2009 , 08:50   Re: Auto Team Balance on Round End
Reply With Quote #3

well I think i didnt see that one. this one still good ;)
__________________



Please FEED MY HAMSTERS by giving me +karma
bomnacama is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 01-14-2009 , 08:58   Re: Auto Team Balance on Round End
Reply With Quote #4

Quote:
Originally Posted by arkshine View Post
Is not already done here ?
I hadn't saw it. I've checked the code and probably mine, instead of the part of the "cstrike module" functions, performs faster
joaquimandrade is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-14-2009 , 12:21   Re: Auto Team Balance on Round End
Reply With Quote #5

1. You can remove the atbre_enabled and atbre_ignore_atb cvars and just go by the mp_autoteambalance cvar.

2. The only difference in this plugin is that Connor's works when the "Auto Team Balance" message shows up and switches on that same round.
Yours switches the round before.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-14-2009 , 12:35   Re: Auto Team Balance on Round End
Reply With Quote #6

Quote:
Originally Posted by Exolent[jNr] View Post
Connor's works when the "Auto Team Balance" message shows up and switches on that same round.
Yours switches the round before.
So my plugin doesn't check players num and teams when it's not needed
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
BOYSplayCS
BANNED
Join Date: Apr 2008
Location: Gainesville, FL
Old 01-14-2009 , 14:20   Re: Auto Team Balance on Round End
Reply With Quote #7

Doesn't that really make this plugin useless then?

Because, Connor's version has already been approved and he can make updates and add features.
BOYSplayCS is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 01-15-2009 , 02:28   Re: Auto Team Balance on Round End
Reply With Quote #8

Quote:
Originally Posted by Exolent[jNr] View Post
1. You can remove the atbre_enabled and atbre_ignore_atb cvars and just go by the mp_autoteambalance cvar.

2. The only difference in this plugin is that Connor's works when the "Auto Team Balance" message shows up and switches on that same round.
Yours switches the round before.
I don't want to remove them. I prefer to set "mp_autoteambalance" to 0, "atbre_ignore_atb" to 1, and don't see the message "Auto team balance next round".

Quote:
Originally Posted by ConnorMcLeod View Post
So my plugin doesn't check players num and teams when it's not needed
Well, the "not needed" is subjective since from the experience that i have, there are players that leave the server if they are on a team with few players. So, i prefer to check every round end since it can partially avoid that since happens sooner. Anyway:

1 - I didn't put this plugin to compete with yours since i didn't even knew it.

2 - I greatly respect your position in this community and i like your coding skills.

3 - I don't mind if anyone remove this plugin, i made it in minutes. It was just a fast fix to a little problem of mine.

Edit:

ConnorMcLeod, in your plugin, why didn't you make balance_teams() return PLUGIN_CONTINUE, PLUGIN_HANDLED instead of 0,1,2 and then call it like:

return balance_teams();

instead of

switch( balance_teams() )

?

And why do you check if(is_user_hltv(id)) ?

Last edited by joaquimandrade; 01-15-2009 at 03:12.
joaquimandrade is offline
Old 01-15-2009, 02:31
joaquimandrade
This message has been deleted by joaquimandrade.
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-15-2009 , 06:33   Re: Auto Team Balance on Round End
Reply With Quote #9

Quote:
Originally Posted by joaquimandrade View Post
1 - I didn't put this plugin to compete with yours since i didn't even knew it.
No problem at all ;)

Quote:
Originally Posted by joaquimandrade View Post
ConnorMcLeod, in your plugin, why didn't you make balance_teams() return PLUGIN_CONTINUE, PLUGIN_HANDLED instead of 0,1,2 and then call it like:
I was returning values, depending on if team were full balanced, half balanced, or not balanced at all (can happen with immunity), but no matter.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
bomnacama
Senior Member
Join Date: Dec 2008
Location: Portugal
Old 01-15-2009 , 06:43   Re: Auto Team Balance on Round End
Reply With Quote #10

Quote:
Originally Posted by joaquimandrade View Post
And why do you check if(is_user_hltv(id)) ?
i think its to prevent to switch the hltv to one team.
there are some plugins that do that, and its weird to kill the hltv
__________________



Please FEED MY HAMSTERS by giving me +karma
bomnacama 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:13.


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