AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   [REQ] TF2 Auto-Assign/Team Balancer (https://forums.alliedmods.net/showthread.php?t=73885)

nutz 07-08-2008 01:35

[REQ] TF2 Auto-Assign/Team Balancer
 
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???

nutz 07-09-2008 14:15

Re: [REQ] TF2 Auto-Assign/Team Balancer
 
bueller...bueller?

Freelancer 07-09-2008 19:32

Re: [REQ] TF2 Auto-Assign/Team Balancer
 
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");
}
}


nutz 07-09-2008 19:58

Re: [REQ] TF2 Auto-Assign/Team Balancer
 
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!

nutz 07-09-2008 23:46

Re: [REQ] TF2 Auto-Assign/Team Balancer
 
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 :)

Freelancer 07-10-2008 07:19

Re: [REQ] TF2 Auto-Assign/Team Balancer
 
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

rahmie 07-19-2008 00:21

Re: [REQ] TF2 Auto-Assign/Team Balancer
 
I tried this plugin on my server. It is realy fine and useful :)

One request, Could you add plugin on/off cvar?

nutz 08-20-2008 01:39

Re: [REQ] TF2 Auto-Assign/Team Balancer
 
im going to bump this and see if there would be a way to add admin immunity??

FernFerret 08-21-2008 12:51

Re: [REQ] TF2 Auto-Assign/Team Balancer
 
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 :shock:

--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


All times are GMT -4. The time now is 12:00.

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