PDA

View Full Version : [EXTENSION] CSS Team Balancer


CrimsonGT
10-10-2009, 12:19
This is a simple extension I made for a client so that I could give his donators immunity to the built in team balancer.

I included a sample plugin to help with setup. I will try and get the Linux version compiled, and release the source code today or tommorow.

Example:


public Action:OnBalancePlayer(client, team)
{
if(GetUserFlagBits(client) & ADMFLAG_RESERVATION)
{
LogMessage("Team Balancer blocked switch of player: %N reason: Immunity", client);
return Plugin_Handled;
}

return Plugin_Continue;
}

Chris-_-
10-10-2009, 13:13
Is something like this possible for TF2 aswell?

Forgive me if that's a stupid question :p

CrimsonGT
10-10-2009, 13:22
Should be, I dont really have the time right now to do it as I am getting more jobs on here than I know what to do with. (this was for a paid job, the client just didnt mind this part being released) but if I get time in the near future I could try and find some time to do it for TF2.

DJ Tsunami
10-11-2009, 13:27
It's the same function :)

CCSGameRules::BalanceTeams(void)
CTeamplayRoundBasedRules::BalanceTeams(bool)

And yes, source code please :o

pheadxdll
10-11-2009, 15:55
Sourcecode would be amazing, how do you get the client index and team from that function? :o

Chris-_-
10-15-2009, 13:58
Welcome to the bump train. >_>

pheadxdll
10-15-2009, 15:01
Chris, if I get the source code, I'll make a tf2 version. Unless crimson wants to do it himself. :P

CrimsonGT
10-15-2009, 15:11
Ill post it today, I forgot about it, and goodluck with that, its not the same in TF2, I looked a few days ago.

DJ Tsunami
10-19-2009, 19:53
Hump de bump doop bodu
Hump de bump doop bop
Bump de hump doop bodu

Bump bump

DontWannaName
10-20-2009, 03:26
http://i207.photobucket.com/albums/bb315/analog_jedi/lulz/1219818525352.gif

:D

CrimsonGT
10-20-2009, 11:18
Good lord, I added source to original post.

Chris-_-
10-20-2009, 15:43
Alright, now you have a deadline on getting this to TF2 as well.

CrimsonGT
10-20-2009, 15:57
Alright, now you have a deadline on getting this to TF2 as well.

Im not porting it to tf2, I already mentioned its different from CSS. If anyone wants to try be my guest, I dont have the time nor the reason to do so.

Chris-_-
10-20-2009, 15:58
Augh, :roll:

bl4nk
10-20-2009, 16:04
Hints for TF2 version:
CTeamplayRoundBasedRules::BalanceTeams(bool)
CTFPlayer::CalculateTeamBalanceScore()
CBaseEntity::IsAlive()

I'm not going to release the actual code on how to do it due to me having an agreement with the person I made it for.

CrimsonGT
10-20-2009, 21:29
Augh, :roll:

How about doing something productive with your time on these forums rather than being a tool and making comments like this? Your a perfect example of why I decided not to waste my time working on public mods anymore.

Chris-_-
10-21-2009, 04:05
Whoa, you seem to have some anger in there, it was merely a joke, chill out. Sorry for the spam however.

CrimsonGT
10-21-2009, 10:24
No problem, I just get annoyed when people roll their eyes on here about things like that lol.