Raised This Month: $ Target: $400
 0% 

[REQ] TF2 Auto-Assign/Team Balancer


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
nutz
Member
Join Date: Aug 2007
Location: vegas
Old 07-08-2008 , 01:35   [REQ] TF2 Auto-Assign/Team Balancer
Reply With Quote #1

OK I've searched and havent found anything on this...

I'd think the Force Auto-Assign would be a simple CVAR but i found posts saying that Valve didn't build it in?...so possible for a SM plugin to fix that??

The Team Balancer would be nice as well for when things get silly as far as one team has like 300 pts vs the other teams total of 30...but not vital...

anyone???
__________________
[702]Мąﻞסּř ИữŦz|TR
Forums @ www.rewindabiosis.net
TOOLL4D.nuclearfallout.net:27015
nutz is offline
nutz
Member
Join Date: Aug 2007
Location: vegas
Old 07-09-2008 , 14:15   Re: [REQ] TF2 Auto-Assign/Team Balancer
Reply With Quote #2

bueller...bueller?
__________________
[702]Мąﻞסּř ИữŦz|TR
Forums @ www.rewindabiosis.net
TOOLL4D.nuclearfallout.net:27015
nutz is offline
Freelancer
Senior Member
Join Date: Jun 2007
Location: Bristol , uk
Old 07-09-2008 , 19:32   Re: [REQ] TF2 Auto-Assign/Team Balancer
Reply With Quote #3

Code:
* Forceteam code */

#include <sourcemod>
#include <sdktools>

#define PLUGIN_VERSION "0.7"

public Plugin:myinfo =
{
name = "CI forceteam",
author = "SMM forums_mega_MrG",
description = "Force player into a team as soon as they connect.",
version = PLUGIN_VERSION,
url = "http://www.cleveridiot.com"
}

public OnPluginStart()
{
CreateConVar ("sm_ci_forceteam_version", PLUGIN_VERSION, "CI forceteam Version", FCVAR_PLUGIN | FCVAR_SPONLY | FCVAR_REPLICATED | FCVAR_NOTIFY);
}

public OnClientPutInServer(client)
{
new iBluTeam = GetTeamClientCount(2);
new iRedTeam = GetTeamClientCount(3);

if(iBluTeam > iRedTeam)
{
ChangeClientTeam(client, 3);
FakeClientCommand(client, "joinclass %s", "random");
}
else if (iRedTeam > iBluTeam)
{
ChangeClientTeam(client, 2);
FakeClientCommand(client, "joinclass %s", "random");
}
else if (iBluTeam == iRedTeam)
{
ChangeClientTeam(client, GetRandomInt(2, 3));
FakeClientCommand(client, "joinclass %s", "random");
}
}
Freelancer is offline
nutz
Member
Join Date: Aug 2007
Location: vegas
Old 07-09-2008 , 19:58   Re: [REQ] TF2 Auto-Assign/Team Balancer
Reply With Quote #4

AWESOME!

FYI I had to remove top and bottom parts to get it to compile...you should release that as a plugin for TF2...

thanks a ton!
__________________
[702]Мąﻞסּř ИữŦz|TR
Forums @ www.rewindabiosis.net
TOOLL4D.nuclearfallout.net:27015
nutz is offline
nutz
Member
Join Date: Aug 2007
Location: vegas
Old 07-09-2008 , 23:46   Re: [REQ] TF2 Auto-Assign/Team Balancer
Reply With Quote #5

could i take out the:
FakeClientCommand(client, "joinclass %s", "random");
and make it so they just join the team and not the class?...or change "random" to "scout" by default?

it seems to strip the medic/pyro achievements unless they reselect the class...no biggie but less whining = more gooder
__________________
[702]Мąﻞסּř ИữŦz|TR
Forums @ www.rewindabiosis.net
TOOLL4D.nuclearfallout.net:27015
nutz is offline
Freelancer
Senior Member
Join Date: Jun 2007
Location: Bristol , uk
Old 07-10-2008 , 07:19   Re: [REQ] TF2 Auto-Assign/Team Balancer
Reply With Quote #6

If ya remove the force class selection then its up to the client to select class via , key input.

or change random to scout , sniper. etc
Freelancer is offline
rahmie
Junior Member
Join Date: Jun 2008
Location: Japan
Old 07-19-2008 , 00:21   Re: [REQ] TF2 Auto-Assign/Team Balancer
Reply With Quote #7

I tried this plugin on my server. It is realy fine and useful

One request, Could you add plugin on/off cvar?
rahmie is offline
nutz
Member
Join Date: Aug 2007
Location: vegas
Old 08-20-2008 , 01:39   Re: [REQ] TF2 Auto-Assign/Team Balancer
Reply With Quote #8

im going to bump this and see if there would be a way to add admin immunity??
__________________
[702]Мąﻞסּř ИữŦz|TR
Forums @ www.rewindabiosis.net
TOOLL4D.nuclearfallout.net:27015
nutz is offline
FernFerret
Member
Join Date: Feb 2008
Old 08-21-2008 , 12:51   Re: [REQ] TF2 Auto-Assign/Team Balancer
Reply With Quote #9

I might be able to do something for ya nutz

I'll take a look tonight.

Also looks like this one might b0rk arena mode

--FF

*FF wishes he would stop getting involved in so many plugins!*

EDIT: Ok so I was thinking about how this will work, and I assume for it to work correctly you'll have to have spectate turned off? and if that is so, I don't know where the admins will go, or is the purpose just to get people playing fast? If you're ok with the following senario then i might be able to help:

Pubber A Joins server.
Pubber A is put on Blu team.
Pubber A presses .
Pubber A Switches to Red team when there is a slot open
__________________
Check out the SaySounds Hybrid Edition with Action Sounds! http://forums.alliedmods.net/showthread.php?t=82220

Last edited by FernFerret; 08-21-2008 at 12:57.
FernFerret 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 15:48.


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