PDA

View Full Version : [TF2] Simple Team Manager


Antithasys
11-13-2008, 20:43
Simple Team Manager

This plugin is no longer supported. Please see the new thread for the new version of Simple Team Manager

Description:

Manages players and their teams in TF2.

Features:

Admin flags can be set in simpleteammanager.cfg
Admin menu integration
Players with specified flag can swap their team
Players with specified flag can swap players team and force them to stay there
Players with specified flag can scramble the teams
All players can vote for a team scramble
Works with Simple Team Balancer (http://forums.alliedmods.net/showthread.php?p=684590)Commands:

swapteam <[1]ondeath/[0]instant> - Swaps your current team
moveplayer <name/#userid> <team[number/name]> <[0]instant/[1]ondeath> <[0]unforced/[1]forced> - Moves a players to specified team
scrambleteams - Scrambles the teams
votescramble - Creates a vote to scramble the teamsDefines:

#define USE_STB - Default is 0 or not to work with Simple Team Balancer. This is done so it will compile on the forums. If you use STB you should set this to 1 and compile yourself or download the compiled version.Console Variables:

stm_enabled - Enable or Disable Simple Team Manager
stm_logactivity - Enable or Disable the displaying of events in the log
stm_adminflag_swapteam - Admin flag to use for command
stm_adminflag_moveplayer - Admin flag to use for command
stm_adminflag_scramble - Admin flag to use for command
stm_scrambledelay - Delay to scramble teams once a scramble is called for
stm_voteenabled - Enable voting for a scramble
stm_votewin - Win percentage
stm_votedelay - Delay before another vote can be calledA simpleteammanager.cfg file will be made when first ran. It will be located in /cfgs/sourcemod


Installation:Place the simpleteammanager.smx in the /sourcemod/plugins dir.
Place the simpleteammanager.phrases.txt in the /sourcemod/translations dir.

Changelog:


1.0.1
Fixed incorrectly respawning the wrong player

1.0.0
Created #define for use with STB. Default is 0 (or not to work with STB)
--You can set this to 1 and compile yourself. It's set to 0 so it will compile on forums.
--If you have STB installed, you should run with set to 1 otherwise you will have issues with the balancer
Added moveplayer command to move a player to any team
Allowed moveplayer command to be ran from console
Rearranged moveplayer menu to place forced arg at end
Respawned players after a move or swap
Made forced arg reliant on the precense of STB
Depreciated swapplayer command
Added option to scramble teams at round end
--This will scramble the teams 1 second before the end of mp_bonusroundtime
--This will not scramble if the time left in the map is less than 60 seconds it will not run
Fixed scramble code moving spectators, unassigned players, and fake clients
Fixed enabled cvar not disabling the respective commands

0.9.0
Initial Release

For additional change logs refer to the source code.


Future Updates:

Looking for additional translations! If you have or can translate the phrases, please do and post with the new translations. I will add them to the file and certainly credit you.

French - by Vader_666
Hungarian - by KhyrOO

-Add log activity

Notes:

You do not have to have Simple Team Balancer installed, this will just work with it if it is installed. I have posted a compiled version in 1.1 for you to download. The version that compiles on the forums is set to NOT work with Simple Team Balancer so it will compile on the forums. If you use Simple Team Balancer you should set the #define to 1 or download the compiled version.

This plugin is no longer supported. Please see the new thread for the new version of Simple Team Manager

ThatGuy
11-13-2008, 21:38
Would it be possible to switch a player to spectator?

By the way, superb plugin :)

Antithasys
11-13-2008, 21:47
Would it be possible to switch a player to spectator?


Somehow I knew that would come up. Since it isn't really swaping the team and more of a team assignment I would have to add a command. I can do that with 1.0.0.

DontWannaName
11-13-2008, 22:57
Woo ok putting on now.

ThatGuy
11-14-2008, 00:16
Odd, when I try to load it i get this


L 11/14/2008 - 00:22:18: [SM] Plugin encountered error 21: Native is not bound
L 11/14/2008 - 00:22:18: [SM] Native "VerifyCoreVersion" encountered a generic error.
L 11/14/2008 - 00:22:18: [SM] Debug mode is not enabled for "simpleteammanager.smx"
L 11/14/2008 - 00:22:18: [SM] To enable debug mode, edit plugin_settings.cfg, or type: sm plugins debug 58 on
[SM] Plugin simpleteammanager.smx failed to load: Native "VerifyCoreVersion" was not found.

When i try to enable debug, it says


[SM] Plugin index 58 not found.

DontWannaName
11-14-2008, 00:24
Are you running 1.1?

DontWannaName
11-14-2008, 00:44
Ok a few things. I know I can edit the plugin to reflect this and maybe use SM but I want to change swapteam to swapme. When you swapme and select on death, it wont switch you if you kill yourself. Can you make scrambleteams scramble at the end of the round or have an option value like 1 and 2 or something, I dont want everyone dieing durring the scramble. Thats all for now.

Antithasys
11-14-2008, 01:49
Odd, when I try to load it i get this

When i try to enable debug, it says

You have to be running 1.0x or something. You can run that version, but you will have to compile it yourself as the compiled version I provided was made in 1.1

Ok a few things. I know I can edit the plugin to reflect this and maybe use SM but I want to change swapteam to swapme. When you swapme and select on death, it wont switch you if you kill yourself. Can you make scrambleteams scramble at the end of the round or have an option value like 1 and 2 or something, I dont want everyone dieing durring the scramble. Thats all for now.

Changing the code to the command name you want is simple and I suggest you give it a try. I am pretty sure that it will swap you if you kill yourself. It wont if the "world" is the reason for the death... in other words you change teams or something. I created my own scramble code because I did not like the built-in one. It just scrambles after the delay and does not restart the round. I did some testing on this and found that this was the best way to handle it. Adding the option to do it at round end would not be to hard. I will see if I can get it into 1.0.0

DontWannaName
11-14-2008, 01:59
Is the scramble based on skill, immunity, or anything else or is it random like valves? With the team balancer players who are immune cant join a team that is full while using the doors in TF2, I thought they were immune and could bypass the door not letting them into the team?

Antithasys
11-14-2008, 02:09
Is the scramble based on skill, immunity, or anything else or is it random like valves? With the team balancer players who are immune cant join a team that is full while using the doors in TF2, I thought they were immune and could bypass the door not letting them into the team?

Its random, and no one is immune to the scramble, it would not make sense to have anyone immune to a team scramble. This plugin still does nothing to the doors, just like the balancer, but it does allow you to bypass the doors with the swapteam or swapplayer command.

DontWannaName
11-14-2008, 17:15
Also, can you add a welcome message to show to flagged players to tell them that they can type !swapteam to change teams.

Neo Cool Dude
11-14-2008, 19:32
Could you add a console cvar to switch a player?

Antithasys
11-14-2008, 19:34
Could you add a console cvar to switch a player?

I don't know what your asking for. How could a cvar switch a player?

boykevin
11-14-2008, 22:31
any way to fix the scrambleteams for mani because mani causes it to crash

DontWannaName
11-14-2008, 22:49
Get rid of Mani, its outdated and will eventually just wont run on TF2 after the next update im guessing. I consider it dead, still ok for css though.

Vader_666
11-15-2008, 05:38
I made the french translation, except for the PlayerLevelCmd, because i'm not sure of understand it... Can you explain it's context ?

Neo Cool Dude
11-15-2008, 11:25
I don't know what your asking for. How could a cvar switch a player?

I mean a command you can enter from the server's console not the in-game console.

Antithasys
11-15-2008, 11:53
I made the french translation, except for the PlayerLevelCmd, because i'm not sure of understand it... Can you explain it's context ?

This is just to tell the player that they cannot run the command from the console. To run swapteam from the console doesn't make sense because you would be at the server level and not on a team.

That leads me to...

I mean a command you can enter from the server's console not the in-game console.

Ya I can make the swapplayer command work from the console. Will do it in 1.0.0. But like I just said, I it doesn't make sense to do it for swapteam.

retsam
11-15-2008, 13:47
Can you update main thread with what sm version you need for this.

It clearly doesnt compile or load with 1.1.0.2419.

Vader_666
11-15-2008, 14:17
This is just to tell the player that they cannot run the command from the console. To run swapteam from the console doesn't make sense because you would be at the server level and not on a team.

Okay :)
Here it is the complete french translation ;)

boykevin
11-15-2008, 14:19
so then what admin plugin is good for tf2?

BrutalGoerge
11-15-2008, 15:45
so then what admin plugin is good for tf2?
uh, the plugin whose forums you're posting in XD


Question, does scrambling the teams restart the round/map?

retsam
11-15-2008, 15:56
I believe so. I could be wrong though.

Antithasys
11-15-2008, 19:36
Can you update main thread with what sm version you need for this.

It clearly doesnt compile or load with 1.1.0.2419.

This will run on ALL versions of SM. If you are using something less than SM 1.1.0.hg2372 then you will have to compile it yourself. The compiled version was done with that version, BUT it will work with ANY version of SM.


Question, does scrambling the teams restart the round/map?

No. It does not restart the round.

retsam
11-15-2008, 19:53
No it does not.... As I already stated, it will not compile or load in SM 1.1.0.2419. (Yes that is before hg builds)

nor does it compile or load in the official SM 1.0.4 either.


EDIT: OK a friend told me I need the .inc file to compile and then it will compile. I guess thats what the problem is.

It would be helpful if you stated and link'd saying you need that simpleteambalancer.inc file to compile.....

EDIT#2: Ok it compiled but with 1 warning msg and it still doesnt load so....

Antithasys
11-15-2008, 21:35
It would be helpful if you stated and link'd saying you need that simpleteambalancer.inc file to compile.....


Its right there on the first page in red. I even linked the Simple Team Balancer in the first post as well.


EDIT#2: Ok it compiled but with 1 warning msg and it still doesnt load so....

The warning is because the name is to long, however changing it now would be a huge pain. I mite consider doing that, but I can tell you for certain that it does not have anything to do with it not loading.

I will not be able to help you more about your loading issues unless you provide me with more information. Errors in the log? Does it say failed in the list? Does it appear in the list? Do you have debug mode on if you are running something less than 1.1? If you are running 1.1 debug mode is always on.

Try to manually load the file with debug mode on and post any errors in the log.

DontWannaName
11-15-2008, 23:47
Can you maybe make it so when the teams are scrambled everyone doesnt die or make it scramble at the start of the round where everyone respawns instantly? Is it possible to make people immune to the scramble or would that make it less of a scramble? Thanks!

KhyrOO
11-16-2008, 04:40
Great work again, and here is the Hungarian translation AGAIN! :mrgreen::mrgreen::mrgreen:

Vader_666
11-16-2008, 06:30
I merged the french and the Hungarian translation made by KhyrOO ;)

DJ Tsunami
11-16-2008, 07:05
No it does not.... As I already stated, it will not compile or load in SM 1.1.0.2419. (Yes that is before hg builds)
I would seriously suggest updating then, 2419 is like 3/4 months old...

boykevin
11-16-2008, 13:34
i have a problem
when i do swapplayer it just kills me and switches me not the other person also.
Also Idea can you make it so an admin can switch 2 people and also have a vote for it as well?

BrutalGoerge
11-16-2008, 13:36
Can you maybe make it so when the teams are scrambled everyone doesnt die or make it scramble at the start of the round where everyone respawns instantly? Is it possible to make people immune to the scramble or would that make it less of a scramble? Thanks!
maybe add it as a different command... like scrambleams_round //scrambles teams at the beginning of the next round.


What I noticed is that scrambling will grab someone out from spectator and put them on a team, but if they are in spectate from just joining (on the motd screen) it will put them on a team, but it won't give them a player class, and afkmgr cannot seem to do anything about that, so if that person is afk, admin has to be there to kick them.

If they are stuck like that, they can choose a class then spawn, but they may not realize it, since they see the spawn timer, but they never spawn.

Antithasys
11-16-2008, 14:35
What I noticed is that scrambling will grab someone out from spectator and put them on a team, but if they are in spectate from just joining (on the motd screen) it will put them on a team, but it won't give them a player class, and afkmgr cannot seem to do anything about that, so if that person is afk, admin has to be there to kick them.

If they are stuck like that, they can choose a class then spawn, but they may not realize it, since they see the spawn timer, but they never spawn.

Interesting. I know what the problem is and can fix that.

Antithasys
11-16-2008, 23:20
For those who want to fix the specs being dragged into scramble issue themselves, look for "if(IsClientInGame(i)) {" and replace it with "if(IsClientInGame(i) && GetClientTeam(i) >= 2) {"


That wont actually solve that problem. Spectator is team 1 and you will never get team 3. Close thou.


For anyone who wants all players to be immediately respawned after a scramble, add "TF2_RespawnPlayer(players[i]);" after "ChangeClientTeam(players[i], team ? TEAM_RED : TEAM_BLUE);" but with indentation matching "CleanUp(players[i])" and then add "#include <tf2>" after "#include <sourcemod>" at the top.


That will work and actually is in the next version.


Thanks for another awesome plugin antihasys. I can finally retire the hacked-beyond-recognition version of MistaGee's switcher that I used with STB until now.


You are quite welcome. I wanted to release a 0.9.0 version because I knew a lot of people really wanted something like this... but it is still a work in progress. I am happy to get any input on it before I release the 1.0.0 version.

BrutalGoerge
11-17-2008, 03:17
I was also thinking for TF2 Arena... every X rounds, scramble the teams.

Antithasys
11-17-2008, 14:51
It DOES work - I tested it myself along with half a dozen people braving 500ms pings to my local test server. Perhaps you misread that as "GetClientTeam(i) == 2" when it's actually ">= 2"?

I actually read it as less than not greater than. My bad. Greater or equal to 2 would work.

Antithasys
11-17-2008, 18:28
Okay :)
Here it is the complete french translation ;)

Thanks!

Great work again, and here is the Hungarian translation AGAIN! :mrgreen::mrgreen::mrgreen:

Thanks!

I merged the french and the Hungarian translation made by KhyrOO ;)

Thanks again!

I will add these to the first post when I release 1.0.0 soon. Hopefully by this weekend.

DontWannaName
11-17-2008, 21:17
or in Antithasys (http://forums.alliedmods.net/member.php?u=36954) time, next Thursday lol :D

Antithasys
11-20-2008, 15:25
or in Antithasys (http://forums.alliedmods.net/member.php?u=36954) time, next Thursday lol :D

I do have a day job that actually pays me money. Don't think my creditors will take karma bucks. :wink:

DontWannaName
11-26-2008, 02:01
Can you add a way to scramble the teams half way through a map at the end of the round or beginning if its close to the halfway point like how timelimit works. I know when im not on my server can get very unbalanced and people will leave all at once making it dead very fast. I good balance would fix this problem as long as its in the middle of mp_timelimit and isnt in the middle of a round on bad or gold or something.

DJ Tsunami
11-26-2008, 12:08
There is already a plugin that switches teams when it's half time.

Antithasys
11-26-2008, 17:24
Still working on 1.0.0.

So far I have corrected these errors:
Allow swapplayer at console level
Spawn players instantly
No longer includes spectators and bots in team scramble
Rearranged swapplayer forced arguments
Fixed error where scramble team command didn't check for flag

I am working on these:
Adding moveplayer command and admin menu
Adding ability to scramble teams at round end
Adding a welcome message, and cvar
Rearranging the menu order to have forced menu as last
Making force menu reliant on STB
Adding log activity

This being a holiday weekend not sure of the timing. Stay tuned.

ThatGuy
11-27-2008, 00:38
Adding ability to scramble teams at round end



Niceee! :D

willy1234x1
12-21-2008, 12:19
So when's this update coming out?:)

Antithasys
12-21-2008, 12:56
So when's this update coming out?:)

Ya, this got pushed to the back burner because of work, and updates to other plugins. It's next thou. Have a good start as you can see, just need to finalize a few things. Shouldn't be to long.

manumenendez
01-05-2009, 19:28
Hi guys,
I am trying to use this plugin in my TF2 server with the latest 1.2 snapshot running, but I am not able to do it. It does not create the cfg file in the cfg folder, and when I type any of the commands it does not give any answers. Am I doing something wrong or is it just that it does not work with 1.2 snapshots? If it does not work, what can I do? Do I have to switch to 1.1.0??
Thanks guys

Chris-_-
01-06-2009, 14:44
Does immunity levels work together with this plugin?

Antithasys
01-06-2009, 15:21
Does immunity levels work together with this plugin?

Not sure what you are asking.

Chris-_-
01-06-2009, 16:38
Can admins with lower immunity level switch admins with higher immunity level?

Antithasys
01-06-2009, 17:33
Right now, yes. I have implemented some code in 1.0 that will prevent that.

EDIT:

I was incorrect, I did have immunity checks. I did use a better method to find a target in 1.0 thou, so you can now use the name.

Antithasys
01-07-2009, 01:26
1.0.0
Created #define for use with STB. Default is 0 (or not to work with STB)
--You can set this to 1 and compile yourself. It's set to 0 so it will compile on forums.
--If you have STB installed, you should run with set to 1 otherwise you will have issues with the balancer
Added moveplayer command to move a player to any team
Allowed moveplayer command to be ran from console
Rearranged moveplayer menu to place forced arg at end
Respawned players after a move or swap
Made forced arg reliant on the precense of STB
Depreciated swapplayer command
Added option to scramble teams at round end
--This will scramble the teams 1 second before the end of mp_bonusroundtime
--This will not scramble if the time left in the map is less than 60 seconds it will not run
Fixed scramble code moving spectators, unassigned players, and fake clients
Fixed enabled cvar not disabling the respective commands


You will also need to update Simple Team Balancer (http://forums.alliedmods.net/showthread.php?p=684590) if you use that. It has fixes for the natives that this plugin uses.

manumenendez
01-07-2009, 09:18
Hi guys,
I am trying to use this plugin in my TF2 server with the latest 1.2 snapshot running, but I am not able to do it. It does not create the cfg file in the cfg folder, and when I type any of the commands it does not give any answers. Am I doing something wrong or is it just that it does not work with 1.2 snapshots? If it does not work, what can I do? Do I have to switch to 1.1.0??
Thanks guys

Chris-_-
01-07-2009, 12:52
Right now, yes. I have implemented some code in 1.0 that will prevent that.

EDIT:

I was incorrect, I did have immunity checks. I did use a better method to find a target in 1.0 thou, so you can now use the name.

Cheers dude, that's awesome.

Chris-_-
01-07-2009, 14:53
Found a bug in the latest version, when switching people, it works and all, but it seems to kill me too, and resets me to spawn. (not changing teams tho)

EDIT: Doesnt kill me, just respawns me instantly. Thought it was map-wise first.

Player ((BlAcK-AnGeL)) [SuRƒ] joined team BLU
[STM] ((BlAcK-AnGeL)) [SuRƒ]'s team has been switched
[STM] Your team has been switched by an Admin

Antithasys
01-07-2009, 15:30
1.0.1
Fixed incorrectly respawning the wrong player

Chris-_-
01-07-2009, 16:19
Cheers

BrutalGoerge
01-07-2009, 19:58
console cannot initiate the scrambleteams command...


] rcon sm_scrambleteams 0
L 01/07/2009 - 18:55:25: [SM] Native "GetUserFlagBits" reported: Client index 0 is invalid
L 01/07/2009 - 18:55:25: [SM] Displaying call stack trace for plugin "simpleteammanager.smx":
L 01/07/2009 - 18:55:25: [SM] [0] Line 516, /home/groups/alliedmodders/forums/files/3/6/9/5/4/35648.attach::IsValidAdmin()
L 01/07/2009 - 18:55:25: [SM] [1] Line 316, /home/groups/alliedmodders/forums/files/3/6/9/5/4/35648.attach::Command_ScrambleTeams()

Antithasys
01-08-2009, 00:41
console cannot initiate the scrambleteams command...


] rcon sm_scrambleteams 0
L 01/07/2009 - 18:55:25: [SM] Native "GetUserFlagBits" reported: Client index 0 is invalid
L 01/07/2009 - 18:55:25: [SM] Displaying call stack trace for plugin "simpleteammanager.smx":
L 01/07/2009 - 18:55:25: [SM] [0] Line 516, /home/groups/alliedmodders/forums/files/3/6/9/5/4/35648.attach::IsValidAdmin()
L 01/07/2009 - 18:55:25: [SM] [1] Line 316, /home/groups/alliedmodders/forums/files/3/6/9/5/4/35648.attach::Command_ScrambleTeams()

Interesting. Don't think I accounted for that. Will look into it.

ENF
01-08-2009, 02:18
Oh hey... look at that, I was coming here to post about the wrong-player switching thing... but I see it's been addressed. I only noticed that it happened once.

No other errors or problems, but will update later today.

BrutalGoerge
01-08-2009, 02:20
Interesting. Don't think I accounted for that. Will look into it.
Thanks. I was trying to use custom votes to give votescramble to public players, kind of like rockthevote, 6 people say scramble, then it starts the vote... but it wasn't working, then i saw the error output.

Antithasys
01-08-2009, 02:30
Thanks. I was trying to use custom votes to give votescramble to public players, kind of like rockthevote, 6 people say scramble, then it starts the vote... but it wasn't working, then i saw the error output.

The scramble command needs attention too. It currently doesn't give the option to scramble at round end when run as a command, only in the menu system. I am aware of the this and need to add a command line trigger for it. Currently vote scramble runs when the vote is won, right after the vote scramble delay. So what I really need to do is add a cvar to allow admins to run right away or at round end for a vote win, and also add a trigger for the chat and command line command.

If there are any other suggestions, I am always open to good ideas. When updating my plugins I always like to make as many changes as I can, that way I don't have a lot of versions out there. (Although I still manage to have more than enough) :shock:

DontWannaName
01-08-2009, 03:09
I am using Brainstorms but his only switches 2 people at a time. Can you add the vote feature for regular players and if it wins, it does it at the round end. Also, can you respawn players like he does, and put a check in for engis with buildings and uber levels when its done instantly.

Antithasys
01-08-2009, 03:56
I am using Brainstorms but his only switches 2 people at a time.


Mine does not do that. It in fact places all the players into an array, and then randomly sorts the array and then assigns each player to a team. It is done completlt at random and no one is immune.


Can you add the vote feature for regular players and if it wins, it does it at the round end.


I have already said that I am aware of this and will implement a cvar in the next version.


Also, can you respawn players like he does, and put a check in for engis with buildings and uber levels when its done instantly.

I do respawn players right away. I see no point for a check for buildings or ubers when trying to scramble the teams. If the teams need to be changed and the admin sets the future cvar to instant, then buildings and ubers should not matter.

atmuh
01-08-2009, 16:27
would it be possible for a later version to be able to change the names of the red and blu team (like you can do in tournament mode with the mp_tournament_redteamname and mp_tournament_blueteamname cvars)

Antithasys
01-08-2009, 18:29
would it be possible for a later version to be able to change the names of the red and blu team (like you can do in tournament mode with the mp_tournament_redteamname and mp_tournament_blueteamname cvars)

Really? I would think that would be better in a seperate plugin. I guess it does have something to do with "teams" but not sure if that is something I would want to add.

I think something was created in the request section for this. A seperate plugin would seem to be the way to go.

Chris-_-
01-08-2009, 18:50
All the players on my server gets the message that the command "!swapteam" is avaliable, but they dont actually got access to it, im using SourceBans as administration panel: .cfg file has stm_adminflag_swapteam "a"

Antithasys
01-08-2009, 19:26
That's very odd. There is code to check for that. Only players with the flag should get that ad. Just double checked too and the code is all there. Will have to look into it more.

Chris-_-
01-09-2009, 08:00
Yeah it was really odd because im the admin on the server and i DONT get the message, maybe that can help you

manumenendez
01-09-2009, 09:40
Could anyone help me installing this plugin with 1.2 snapshots? Or do I need to use 1.1?
Thanks

Lebson506th
01-09-2009, 10:22
Unless you are running L4D, i would use 1.1

Antithasys
01-09-2009, 14:01
Could anyone help me installing this plugin with 1.2 snapshots? Or do I need to use 1.1?
Thanks

I have not tested this on 1.2 at all. Since this is for TF2, I would be using the release version of 1.1.

Chris-_-
01-10-2009, 13:51
I wanna suggest a wildcard feature " * ", possible or not?

Antithasys
01-10-2009, 14:43
I wanna suggest a wildcard feature " * ", possible or not?

What is the wildcard for? lol :shock:

Chris-_-
01-10-2009, 15:49
Move several players *duh* , im sure you figured it out, you just had to comment on it eh?

DontWannaName
01-10-2009, 15:52
When people choose to respawn instantly durring the setup round can you respawn them instantly?

Antithasys
01-10-2009, 15:55
Move several players *duh* , im sure you figured it out, you just had to comment on it eh?

lol

I currently use the helper FindTarget so I don't have to parse what could be the name or userid, etc. I don't see how that could be incorporated without breaking away from that and parsing everything myself, and I am not really prepared to do that.

I could only see this useful in moving a bunch of people with the same tag, like [clanname] or something to the same team. Is that really the final objective? If so, that would actually be easier to do.

When people choose to respawn instantly durring the setup round can you respawn them instantly?

They should already.

Chris-_-
01-10-2009, 16:11
lol

I currently use the helper FindTarget so I don't have to parse what could be the name or userid, etc. I don't see how that could be incorporated without breaking away from that and parsing everything myself, and I am not really prepared to do that.

I could only see this useful in moving a bunch of people with the same tag, like [clanname] or something to the same team. Is that really the final objective? If so, that would actually be easier to do.



They should already.

Yeah clans, and bots (Bot01, Bot02 ...)

DontWannaName
01-10-2009, 18:06
When clients do a votescramble, its slays people and people can lose their sentrys and stuff, gets quite ugly. Can you make it start the round over, one time I did it during setup and people complained cause it gave red a disadvantage because setup time was lost. I restarted the round and that screwed up the gates. Which made it a lot worse.

ENF
01-10-2009, 21:28
When clients do a votescramble, its slays people and people can lose their sentrys and stuff, gets quite ugly. Can you make it start the round over, one time I did it during setup and people complained cause it gave red a disadvantage because setup time was lost. I restarted the round and that screwed up the gates. Which made it a lot worse.

I thought, somewhere, he said that he was going to make the votescramble do the scramble at the end of a round. I agree that the instant-scramble does create some complaints. If we (admin) do a forced scramble, it is always at the end of a round/map.

DontWannaName
01-14-2009, 01:51
heh the bug report thats in the other topic, they both look the same...

OziOn
01-19-2009, 08:33
Here's the danish translation:
"Phrases"
{
"PlayerLevelCmd"
{
"en" "Command must be run at the player level"
"fr" "Cette commande doit être tapée en jeu"
"hu" "Ezt a parancsot jatekosi szinten kell futtatni!"
"da" "Kommandoen skal køres på spillerens plan."
}
"RestrictedCmd"
{
"en" "You must be a donator or admin to run this command"
"fr" "Vous devez être un donateur ou un admin pour lancer cette commande"
"hu" "A parancs futtatasahoz admin, vagy tamogatoi szint szukseges!"
"da" "Du skal være donor eller administrator, for at køre denne kommando."
}
"InValidTeam"
{
"en" "You must be on red or blue to swap teams"
"fr" "Vous devez être RED ou BLU pour changer d'équipe"
"hu" "Jatekban kell lenned, hogy megcsereld a csapatokat!"
"da" "Du skal være på det blå eller røde hold, for at skifte hold."
}
"PlayerInValidTeam"
{
"en" "Player must be on red or blue to swap teams"
"fr" "Le joueur doit être RED ou BLU pour changer d'équipe"
"hu" "Valamelyik csapatban kell lenni, hogy csere legyen"
"da" "Spiller skal være på det blå eller røde hold, før denne kan flyttes."
}
"PlayerQueue"
{
"en" "You have been queued to swap teams on next death"
"fr" "Vous avez été mis en attente pour changer d'équipe lors de votre prochaine mort"
"hu" "A kovetkezo halalnal csapatcsere lesz"
"da" "Du er blevet indstillet til at skifte hold næste gang du dør."
}
"PlayerSwitched1"
{
"en" "Your team has been switched as requested"
"fr" "Vous avez changé d'équipe comme demandé"
"hu" "A keresnek eleget teve a csapatod meg lett csererlve"
"da" "Du har skiftet hold, som anmodet."
}
"PlayerSwitched2"
{
"en" "Your team has been switched by an Admin"
"fr" "Vous avez été changé d'équipe par un admin"
"hu" "Az Admin megcserelte a csapatodat!"
"da" "Du er blevet flyttet til det andet hold af en administrator."
}
"SwapTeamMsg"
{
"en" "Type /swapteam or !swapteam to swap your team!"
"da" "Skriv /swapteam eller !swapteam for at skifte hold!"
}
"PlayerSwitched3"
{
"#format" "{1:s}"
"en" "{1}'s team has been switched"
"fr" "{1} a changé d'équipe"
"hu" "{1} csapata meg lett cserelve"
"da" "{1} blev flyttet til det andet hold."
}
"Scramble"
{
"en" "Teams are about to be scrambled!"
"fr" "Les équipes vont être rééquilibrés"
"hu" "A csapatok hamarosan meg lesznek keverve!"
"da" "Holdene vil blive blandet om et øjeblik!"
}
"VoteScramble1"
{
"#format" "{1:i}{2:i}"
"en" "Vote Scramble successful with {1} votes out of {2}"
"fr" "Le vote d'équilibrage des équipes a réussi avec {1} votes pour sur {2}"
"hu" "A szavazas sikeres volt, {1} szavazat a keveresre a {2} -bol"
"da" "Afstemning om at blande holdene var succesfuld med {1} ud af {2} stemmer."
}
"VoteScramble2"
{
"#format" "{1:i}{2:i}"
"en" "Vote Scramble failed with {1} votes out of {2}"
"fr" "Le vote d'équilibrage a échoué avec {1} votes pour sur {2}"
"hu" "A szavazas sikertelen volt, {1} szavazat a keveresre a {2} -bol"
"da" "Afstemning om at blande holdene slog fejl med {1} ud af {2} stemmer."
}
"VoteInProgress"
{
"en" "A vote is currently in progress"
"fr" "Un vote est actuellement en cours"
"hu" "Egy szavazas mar fut!"
"da" "En afstemning er netop igang."
}
"ScrambleTime"
{
"en" "A vote was recently made, please wait"
"fr" "Un vote a déjà été fait récemment, réessayez plus tard"
"hu" "Nemreg volt szavazas, kerlek varj egy kicsit!"
"da" "En afsteming er afsluttet for et øjeblik siden. Vent venligst."
}
}As a moderator for the danish language at SourceMod, I can say that this has been approved :wink:

Chris-_-
01-21-2009, 13:19
All the players on my server gets the message that the command "!swapteam" is avaliable, but they dont actually got access to it, im using SourceBans as administration panel: .cfg file has stm_adminflag_swapteam "a"

Bumb :roll:

Chris-_-
01-27-2009, 12:33
Ohh, i think i get it, SourceMod (possibly 1.1) adds "plugin." infront of "simpleteammanager.cfg" , had to change that.

Chris-_-
01-31-2009, 16:20
Using the teamswitcher with "instantly" during sudden death will make you respawn, fix please?

OziOn
02-02-2009, 11:57
Hmmm, the scrambleteam command suddenly doesn't work for me any more. I get this in the console when I try it:


L 02/02/2009 - 17:52:48: [SM] Native "GetUserFlagBits" reported: Client index 0 is invalid
L 02/02/2009 - 17:52:48: [SM] Displaying call stack trace for plugin "simpleteammanager.smx":
L 02/02/2009 - 17:52:48: [SM] [0] Line 516, /home/groups/alliedmodders/forums/files/3/6/9/5/4/35648.attach::IsValidAdmin()
L 02/02/2009 - 17:52:48: [SM] [1] Line 316, /home/groups/alliedmodders/forums/files/3/6/9/5/4/35648.attach::Command_ScrambleTeams()

Sourcemod v1.1.0 on a windows machine.

DontWannaName
02-02-2009, 17:42
Did you use rcon to exec the command?

OziOn
02-04-2009, 19:49
Did you use rcon to exec the command?
Yeah. Is that bad?
Nothing seemed to happen when I did it by say /rcon ... either.

DontWannaName
02-04-2009, 19:59
sm_rcon or rcon? Thats why you get that error.

OziOn
02-05-2009, 10:13
So neither rcon or sm_rcon works?

DontWannaName
02-05-2009, 17:29
They could if he added code but no, Im not sure if either will not work but you can try the other rcon that you didnt use.

Antithasys
02-06-2009, 19:14
There will be a new version of this in the future. I have been very occupied with work and personal issues, but I have been keeping track of some issues I have seen pop up. Continue to report issues as you seen them and I will eventually get to the update with the fixes.

Just so you know, the version posted here is the same version I use on my servers as well. I have seen little to no errors, but some things could just some minor adjustments.

Sniper214
02-07-2009, 01:40
Is there any possible way to incorporate a delay between swapteam? I know you can choose after death, I am just thinking of a way to prevent abuse on instant. Say, like a 2 minute delay. Or only allow a specific # of times a person can swap during each round. I realize it may be a pain to do so. Other than that, a great plugin to have, Thanks. :)

OziOn
02-08-2009, 12:28
It seems like the scramble teams function in this plugin doesn't work at all. We just did a successful vote on our server, and nothing happened. Well, something did happen... A player on my team said he suddenly got respawned, but not switched. And some guy on the other team got switched, making the teams 11vs9. Fail :(

It's a TF2 server running SourceMod v1.1.0 on windows.

Antithasys
02-09-2009, 07:41
The scramble code is so simple that I am unsure why it stopped working. It was working fine, but an update from valve seems to have broke it. Now not all players are considered. I am aware of this and will fix it in a future update.

Chris-_-
02-09-2009, 11:01
Noticed this too, good you're aware of the issue.

OziOn
02-28-2009, 20:42
Any ETA on a fix for the scramble part of this plugin?

Antithasys
03-05-2009, 17:24
I have started to use redmine to track all my projects and plugins.

http://projects.mytf2.com/projects/show/simple-plugins

This plugin will now be supported on that site. Future feature requests, bugs, and support will be provided there. I will still be checking this thread and posting new releases here as well, but trunk versions will only be available on the project site.

The scrambler code is under development in the trunk version.

DontWannaName
05-08-2009, 04:44
I think it is showing the type !swapteam welcome message to people without the proper flag. Do you know if this happens with you?

Full-Frontal-Yeti
06-02-2009, 13:48
I have both STB and STM installed , and both seem to work fine.
fairly sure i got the right compiled version with the setting to work with STB.

When the server starts both load and show enabled.
After a map change however they both show loaded and disabled.

As far as i can tell they are both working still.
Teams are balanced when off, and admins can still move people.


On start up:

L 06/02/2009 - 10:43:10: [simpleteammanager.smx] [STM] Simple Team Manager is loaded and enabled.
L 06/02/2009 - 10:43:10: [simpleteammanager.smx] [STM] Log Activity DISABLED.
L 06/02/2009 - 10:43:10: server_cvar: "sm_nextmap" "cp_dustbowl"
L 06/02/2009 - 10:43:10: server_cvar: "sv_tags" "payload"
L 06/02/2009 - 10:43:10: server_cvar: "sv_tags" "payload"
L 06/02/2009 - 10:43:10: [simpleteambalancer.smx] [STB] Hooking round end events for game: tf
L 06/02/2009 - 10:43:10: server_cvar: "mp_teams_unbalance_limit" "2"
L 06/02/2009 - 10:43:10: [simpleteambalancer.smx] [STB] Simple Team Balancer is loaded and enabled.
L 06/02/2009 - 10:43:10: [simpleteambalancer.smx] [STB] Log Activity DISABLED.
L 06/02/2009 - 10:43:10: [simpleteambalancer.smx] [STB] Detailed Log Activity DISABLED.


after map change:

L 06/02/2009 - 10:44:54: [simpleteammanager.smx] [STM] Simple Team Manager is loaded and disabled.
L 06/02/2009 - 10:44:54: [simpleteammanager.smx] [STM] Log Activity DISABLED.
L 06/02/2009 - 10:44:54: [simpleteambalancer.smx] [STB] Simple Team Balancer is loaded and disabled.
L 06/02/2009 - 10:44:54: [simpleteambalancer.smx] [STB] Log Activity DISABLED.
L 06/02/2009 - 10:44:54: [simpleteambalancer.smx] [STB] Detailed Log Activity DISABLED.


just some FYI as they seem to be still working
thanks for the great plug-ins.

DeadlyAvenger
06-03-2009, 10:08
Hello There,

A couple of things I thought of:

1. How can I disable the votescramble feature for players? I want admins to be able to call a votescramble (and *maybe* those with reserved slot access) but not normal players.
2. Can you allow the scramble command to delay 5 seconds and then restart the round?

Your development site you posted a couple of pages back didn't work for me.

Antithasys
06-05-2009, 19:00
The project site is 90% restored. Redmine is up and running and we just have to do a few things. Once it gets back online development on 2.0 will continue. It was about 75% complete.

Stay tuned.

DeadlyAvenger
06-05-2009, 20:17
Glad to hear it.

In the mean time - is there a quick/easy way to only allow admins to rtv? Or, an alternative would be to allow rtv, but only when an admin isn't present, but when one is present - it rtv's immediately instead of waiting? If these features are coming up in 2.0 then fine - but a quick fix/solution until then would be nice?

Thanks in advance :)

Xsinthis
06-18-2009, 07:16
My admins can't work this, and other people can't start a vote scramble. This is my config:
stm_enabled 1//Enable or Disable Simple Team Manager
stm_logactivity 1 //Enable or Disable the displaying of events in the log
stm_adminflag_swapteam a //Admin flag to use for command
stm_adminflag_moveplayer b //Admin flag to use for command
stm_adminflag_scramble b //Admin flag to use for command
stm_scrambledelay 5 //Delay to scramble teams once a scramble is called for
stm_voteenabled 1 //Enable voting for a scramble
stm_votewin 51 //Win percentage
stm_votedelay 210 //Delay before another vote can be called

What did i do wrong?