AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D2] Player Switch Menu and Team Panel v1.2.1 (https://forums.alliedmods.net/showthread.php?t=148874)

seattle_ice 01-30-2011 02:32

[L4D2] Player Switch Menu and Team Panel v1.2.1
 
3 Attachment(s)
Switch a players teams, Swap two players, view current teams and teams as of last round, swap directly with a player on the other team, change to any team at any time, as an admin or a player, pause/unpause the game, unscramble and swap whole teams, and more.

This started as a compilation of the ideas and code from three other plugins, but has grown considerably since then.

It offers an Admin menu and a players menu to help with team switching and spectator control during a game.

Big thanks to the other authors on here, for providing the ideas as well as the plugins to spark this project;

The ideas and code basis for the team/player swapping capabilities comes from the TeamSWITCH plugin by SkyDavid (djromero).

The players panel concept and code basis comes from l4d_teamspanel by OtterNas3.

The spectator control concept and code basis comes from SpecStaysSpec by DieTeetasse.


Admin Menu Items:
  1. Switch Player - bring up a menu with all the in game players to let you select one, then choose what team to move them to.
  2. Swap Players - brings up a menu to let you select a player, then another menu that show all the players not on the same team as the first player. When selected, the two players will be swapped.
  3. Unscramble Teams - Attempts to move players to the teams they were on at the end of the last round. Does not account for order changing because of score.
  4. Swap Both Teams - Swap all infected and survivors to the other team
  5. Pause Game - pause the game
  6. Unpause Game - unpause the game, with a 5 second count down
  7. Current Teams - Displays a panel that show all the current team/spectator alignments, including bots
  8. Last Round Teams - Display a panel that shows the alignment of all the players and teams at the end of the last round played.
  9. Debugging options - Displays a menu that allow you to set various debugging options for the plugin.

Player Menu Items:
  1. Switch to Spectator - Will immediately switch you to spectator
  2. Switch to Survivor - Will immediately switch you to survivor
  3. Switch To Infected - will immediately switch you to the infected team.
  4. Swap teams with someone - Displays a menu of all the players on the other team(s), and when you select one, it will then display a menu to that player, asking them if they want to swap with you. This is a great way to straighten out those jumbled up teams at the map change.
  5. View Current Teams Info - Displays a panel that show all the current team/spectator alignments, including bots
  6. View Last Round Teams Info - Display a panel that shows the alignment of all the players and teams at the end of the last round played.

Spectator Control
  1. Keeps track of who was on spectator at the end of each round, and attempts to keep them there if they join a team at the beginning of the next round.

Console Commands
  • aboutpanel
  • showcurrteams
  • showlastteams
  • joinspec
  • joinsurvivor
  • joininfected
  • swapteams
  • switchmenu
  • sm_switchplayer <playerindex> [1=Spectator;2=Survivor;3=Infected]
  • sm_swapplayers <playerindex1> <playerindex2>
  • sm_debug [0 = Off|1 = PrintToChat|2 = LogToFile|3 = PrintToChat AND LogToFile]

To install: Place the l4d2_bwa_teams_panel.smx in the Sourcemod\Plugins folder, and the l4d2_bwa_teams_panel.txt in the Sourcemod\Gamedata folder.

Version Information:

1.1.5: (2/9/2011)
  • [FIXED] - Display for last rounds players showing incorrectly
  • [ADDED] - Pause/Unpause game functionality on Admin Menu
  • [ADDED] - Unscramble Players feature on Admin Menu - attempts to place all the players back on the teams they were on at the end of the previous round
  • [ADDED] - Swap Teams: Swaps all the Survivors and Infected to the other team
  • [ADDED] - Admin Menu Sorting text file for convenience

1.1.6: (2/9/2011)
  • Added cvar 'l4d2_BwA_TeamPanel_AllowPubs' Allow public access to commands [0 = No|1 = Yes], default = 1(yes). The plugin does not create a config, just add this to your server config if you want it.

1.1.7: (2/27/2011)
  • [ADDED] - cvar 'l4d2_BwA_SelectTeam_From_Panel' Allow Team Switching from panel [0 = No|1 = Yes], default = 1(yes). The plugin does not create a config, just add this to your server config if you want it.
  • [ADDED] - As per the above ConVar, you can now switch teams by selecting the 1, 2 or (3) keys while the panel is displayed, if the above is set to on.
  • Removed the superfluous MaxClients, MAX_SURVS AND MAX_INF displays at bottom of panel.
  • [FIXED] - Compiler warning(sm 1.3.6 stable): "function "SwapWithMe" should return a value".
  • [ADDED] - Team Headings on panel are numbered to match team numbers (1,2 and 3).
  • [ADDED] - Some of the warning/information returns have better information now.

1.1.8: (2/27/2011)
  • [ADDED] - Indicator next to player names on panel for dead players "*", and who is the current tank, if there is one "[Tank]"

1.1.9: (2/27/2011)
  • [ADDED] - cvar 'l4d2_BwA_Print_Chat_MsgType'"Determine the type and frequency of information printed to the in game chat [0 = none|1 = simple messages|2 = verbose color coded messages]"

1.2.0: (2/27/2011)
  • [ADDED] - cvar 'l4d2_BwA_Show_ClientID'"Show the clientid next to the player name in the panel [0 = No|1 = Yes] - Default = 1"


1.2.1: (2/27/2011)
  • [ADDED] - cvar 'l4d2_BwA_TeamPanel_EnablePause' "Enable/Disable this plugins pause feature (default = 1) [0 = disabled|1 = enabled]"

1.2.2: (2/27/2011)
  • [ADDED] - Enabled plugin to run in L4D1

http://www.nthtechnologies.com/forum.../TPTopMenu.JPG
http://www.nthtechnologies.com/forum...SwitchMenu.JPG
http://www.nthtechnologies.com/forum...MenuSwitch.JPG
http://www.nthtechnologies.com/forum...TPMenuSwap.JPG
http://www.nthtechnologies.com/forum...PMenuDebug.JPG
http://www.nthtechnologies.com/forum...TPMenuMain.JPG
http://www.nthtechnologies.com/forum...PCurrPanel.JPG

Cthulhu 02-06-2011 11:15

Re: L4D2 Player Switch Menu and Team Panel
 
l4d2_bwa_teams_panel.txt goes to?

delirium_trigger 02-06-2011 16:29

Re: L4D2 Player Switch Menu and Team Panel
 
Quote:

Originally Posted by Cthulhu (Post 1408570)
l4d2_bwa_teams_panel.txt goes to?


Looks like signatures. Usually these go in the gamedata folder. Try that first.

seattle_ice 02-09-2011 02:43

Re: L4D2 Player Switch Menu and Team Panel
 
Quote:

Originally Posted by Cthulhu (Post 1408570)
l4d2_bwa_teams_panel.txt goes to?

As deliruim said, the 'Sourcemod\gamedata' folder. I will add that to the info in the first post.

crazydog 02-09-2011 03:12

Re: L4D2 Player Switch Menu and Team Panel
 
Awesome. Nice to have a working swap plugin again. I was getting frustrated of manually switching through spec.

seattle_ice 02-09-2011 18:30

Re: L4D2 Player Switch Menu and Team Panel
 
Quote:

Originally Posted by crazydog (Post 1410686)
Awesome. Nice to have a working swap plugin again. I was getting frustrated of manually switching through spec.

Our problem is that we play a lot of large versus games (8 on 8 and such) and the game is always swapping people around. So we needed a faster and better way to keep track and make multiple switches.

PpZ | Iconoclast 02-22-2011 11:02

Re: L4D2 Player Switch Menu and Team Panel
 
Haven't installed it on my server yet, but I certainly will later this evening...I've been looking for a good teamswitch plugin.

One question: is it possible to disable non-admin player access to the functions of the plugin? You said in your post that it can be abused if players know how to access it...while I'm sure most don't, is there some way that you can disable player access completely so that only admins are able to use the features?

Cheers!

seattle_ice 02-22-2011 20:38

Re: L4D2 Player Switch Menu and Team Panel
 
Quote:

Originally Posted by PpZ | Iconoclast (Post 1421107)
Haven't installed it on my server yet, but I certainly will later this evening...I've been looking for a good teamswitch plugin.

One question: is it possible to disable non-admin player access to the functions of the plugin? You said in your post that it can be abused if players know how to access it...while I'm sure most don't, is there some way that you can disable player access completely so that only admins are able to use the features?

Cheers!


Not at the moment, but that would be fairly easy to implement as a convar in the config file. I will look at that in the next day or two.

PpZ | Iconoclast 02-22-2011 22:00

Re: L4D2 Player Switch Menu and Team Panel
 
I notice there is a third file included with the original post: adminmenu_sorting.txt - does this have to go anywhere is it not needed at all? Thanks!

EDIT: Nevermind, the contents of this file get added to the adminmenu_sorting.txt file in the /configs folder, right? :)

nicoh93 02-22-2011 22:38

Re: L4D2 Player Switch Menu and Team Panel
 
l4d1 compatible?

seattle_ice 02-23-2011 17:31

Re: L4D2 Player Switch Menu and Team Panel
 
Quote:

Originally Posted by nicoh93 (Post 1421545)
l4d1 compatible?

I have no idea. I would have to remove the check for L4D2 only I have in the plugin_startup to try it, but we don't have any L4D1 servers to test it on.



Quote:

Originally Posted by PpZ | Iconoclast (Post 1421530)
I notice there is a third file included with the original post: adminmenu_sorting.txt - does this have to go anywhere is it not needed at all? Thanks!

EDIT: Nevermind, the contents of this file get added to the adminmenu_sorting.txt file in the /configs folder, right? :)

That is correct. It is not necessary, except that it is nice to have the menus sort the way you want.

seattle_ice 02-23-2011 19:38

Re: L4D2 Player Switch Menu and Team Panel
 
Quote:

Originally Posted by PpZ | Iconoclast (Post 1421107)
Haven't installed it on my server yet, but I certainly will later this evening...I've been looking for a good teamswitch plugin.

One question: is it possible to disable non-admin player access to the functions of the plugin? You said in your post that it can be abused if players know how to access it...while I'm sure most don't, is there some way that you can disable player access completely so that only admins are able to use the features?

Cheers!

Added for you:

1.1.6: (2/9/2011)
Added cvar 'l4d2_BwA_TeamPanel_AllowPubs' Allow public access to commands [0 = No|1 = Yes], default = 1(yes). The plugin does not create a config, just add this to your server config if you want it.

PpZ | Iconoclast 02-23-2011 19:55

Re: L4D2 Player Switch Menu and Team Panel
 
Quote:

Originally Posted by seattle_ice (Post 1422411)
Added for you:

1.1.6: (2/9/2011)
Added cvar 'l4d2_BwA_TeamPanel_AllowPubs' Allow public access to commands [0 = No|1 = Yes], default = 1(yes). The plugin does not create a config, just add this to your server config if you want it.

Awesome! Thanks man! :)

Skorpion1976 02-27-2011 08:53

Re: L4D2 Player Switch Menu and Team Panel
 
Hi! nice job! Iīve just installed it on the first 20vs server. From what I can tell so far, it works smoothly. I have two suggestions for further improvement and usability:

1. Please number consecutively the panel sections. Currently there is no "1, 2, 3" visible, for Spec, Surv, Infected, when a player opens the current team panel. Of course everyone knows what team a number refers to, but I feel the numbers are "missing". :)
2. I extended the commands available for non admins. Here we go:

HTML Code:

// Show panel with team members as of the end of the last round
    RegConsoleCmd("showlastteams", ShowLastRoundTeamPanel);
    RegConsoleCmd("showlastteam", ShowLastRoundTeamPanel);
    RegConsoleCmd("lastteams", ShowLastRoundTeamPanel);
    RegConsoleCmd("lastteam", ShowLastRoundTeamPanel);
   
    // Join various teams directly, team must have open slot
    RegConsoleCmd("joinspec", JoinSpectatorTeam);
    RegConsoleCmd("afk", JoinSpectatorTeam);
    RegConsoleCmd("team1", JoinSpectatorTeam);
    RegConsoleCmd("spectate", JoinSpectatorTeam);
    RegConsoleCmd("spectator", JoinSpectatorTeam);
    RegConsoleCmd("spec", JoinSpectatorTeam);
    RegConsoleCmd("idle", JoinSpectatorTeam);
    RegConsoleCmd("away", JoinSpectatorTeam);
    RegConsoleCmd("joinsurvivor", JoinSurvivorTeam);
    RegConsoleCmd("joinsurvivors", JoinSurvivorTeam);
    RegConsoleCmd("js", JoinSurvivorTeam);
    RegConsoleCmd("jts", JoinSurvivorTeam);
    RegConsoleCmd("survivor", JoinSurvivorTeam);
    RegConsoleCmd("survivors", JoinSurvivorTeam);
    RegConsoleCmd("team2", JoinSurvivorTeam);
    RegConsoleCmd("joininfected", JoinInfectedTeam);
    RegConsoleCmd("infected", JoinInfectedTeam);
    RegConsoleCmd("team3", JoinInfectedTeam);
    RegConsoleCmd("jti", JoinInfectedTeam);
    RegConsoleCmd("ji", JoinInfectedTeam);

A LOT of players type one of these commands. Anyone feel free to include them.

3. Compiler warning(sm 1.3.6 stable): "function "SwapWithMe" should return a value"
4. I thought the showcurrteams cmd not only shows the panel but ALSO lets me switch to the desired team by pressing either 1, 2 or 3 as long as the panel is open. Well, it does not :). Is there any chance to include this functionality?

Skorpion1976 02-27-2011 09:54

Re: L4D2 Player Switch Menu and Team Panel
 
1 Attachment(s)
1. I made a screenshot. See attached file. Depending on the current player count, the max. spec slot count is a dynamic value, in this case itīs "12". This leads to misinterpreting from what I can tell. People believed there are always fixed 12 spec slots available... Why not showing the max available slot value: "xx of 20" (10vs10 server) instead? This is confusing for me :).
2. I see that you use MaxClients in the code and its value is "32". The panel also shows this value twice. This is not the real player count but the "engine max player count". Shouldnīt the value represent the max slots this server is capable of, in this case "20"?

cheers, Skorpion1976

seattle_ice 02-27-2011 15:29

Re: L4D2 Player Switch Menu and Team Panel
 
Quote:

Originally Posted by Skorpion1976 (Post 1424757)
1. Please number consecutively the panel sections. Currently there is no "1, 2, 3" visible, for Spec, Surv, Infected, when a player opens the current team panel. Of course everyone knows what team a number refers to, but I feel the numbers are "missing". :)

I could add those fairly easily, so will do so.

Quote:

Originally Posted by Skorpion1976 (Post 1424757)
3. Compiler warning(sm 1.3.6 stable): "function "SwapWithMe" should return a value"

I will add a return to fix that

Quote:

Originally Posted by Skorpion1976 (Post 1424757)
4. I thought the showcurrteams cmd not only shows the panel but ALSO lets me switch to the desired team by pressing either 1, 2 or 3 as long as the panel is open. Well, it does not :). Is there any chance to include this functionality?

I will consider looking at adding that functionality depending on how much time I have.

Quote:

Originally Posted by Skorpion1976 (Post 1424821)
1. I made a screenshot. See attached file. Depending on the current player count, the max. spec slot count is a dynamic value, in this case itīs "12". This leads to misinterpreting from what I can tell. People believed there are always fixed 12 spec slots available... Why not showing the max available slot value: "xx of 20" (10vs10 server) instead? This is confusing for me :).
2. I see that you use MaxClients in the code and its value is "32". The panel also shows this value twice. This is not the real player count but the "engine max player count". Shouldnīt the value represent the max slots this server is capable of, in this case "20"?

cheers, Skorpion1976

The spectator count accurately reflects (MaxClients - (MaxSurvivors + MaxInfected)), and I think I will leave it that way. It will probably confuse someone no matter which way you decide to do it, so I am going to just stick with the accurate number for now.

I use MaxClients because it is the actual number, including spectators, that can connect to our servers. That is why you also see the Max Survivors and Infected displayed.

In actuality, the numbers at the bottom (MaxClients, MAX_SURVIVORS and MAX_INFECTED) were supposed to be removed, as they were just for testing. The numbers are already indicated by the upper sections.




seattle_ice 02-27-2011 17:04

Re: L4D2 Player Switch Menu and Team Panel
 
Most of the above ideas I have now implemented, and the new version 1.1.7 is available in the first post.

Good thoughts everyone, appreciate the input.

Skorpion1976 03-05-2011 07:14

Re: L4D2 Player Switch Menu and Team Panel
 
uuuuuh, thank you! works fine! Havenīt been here for some days. I like the smooth switching after opening the player panel :)

Due to my starsign I am a greedy human being :mrgreen:, so I have 2 more "requests" :):

1. highlight dead survivors(prefix "-" and Name in other color): "- Skorpion1976"
2. highlight TANKS (postfix "(TANK)" after the infected name.

Both for bots and real players.

I already tried to code but jesus, I have no clue what to do :).
This is how far Iīve come, for survivors:

PHP Code:

for (new 1<= MaxClientsj++)
    {
        if (
PlayerTeam[j] == TEAM_SURVIVOR)
        {
            
count++;
            if ((
PlayerBot[j]) && IsPlayerAlive(PlayerBot[j]))
            {
                
Format(textsizeof(text), "%d. %s"countPlayerName[j]);
                
DrawPanelText(playerpaneltext);
            }
            else if ((
PlayerBot[j]) && !IsPlayerAlive(PlayerBot[j]))
            {
                
Format(textsizeof(text), "%d. - %s"countPlayerName[j]);
                
DrawPanelText(playerpaneltext);
            }
            
/*else
            {
                Format(text, sizeof(text), "%d. %s (%d)", count, PlayerName[j], j);
                DrawPanelText(playerpanel, text);
            }        */
        
}
    } 

This for TANK:
PHP Code:

for (new 1<= MaxClientsj++)
        {
            if (
PlayerTeam[j] == TEAM_INFECTED)
            {
                
count++;
                if (
PlayerBot[j])
                {
                    if(
GetEntProp(PlayerBot[j], Prop_Send"m_zombieClass") == 8//If Player = tank
                    
{
                        
Format(textsizeof(text), "%d. %s (TANK)"countPlayerName[j]);
                        
DrawPanelText(playerpaneltext);
                    }
                    else if (
GetEntProp(PlayerBot[j], Prop_Send"m_zombieClass") != 8//everyone else
                    
{
                        
Format(textsizeof(text), "%d. %s"countPlayerName[j]);
                        
DrawPanelText(playerpaneltext);
                    }
                }
                else
                {
                    
Format(textsizeof(text), "%d. %s (%d)"countPlayerName[j], j);
                    
DrawPanelText(playerpaneltext);
                }        
            }
        } 

The engine shows nothing at all in the game, when I open the player panel. I never see "player name (TANK)" in the infected menu. The "-" dead prefix either gets shown when the players are incap or it gets shown all the time I open the panel. I think itīs not a big deal to get these informations into the panel. Any chance you can do that? Want donation? :)

seattle_ice 03-05-2011 14:37

Re: L4D2 Player Switch Menu and Team Panel
 
Quote:

Originally Posted by Skorpion1976 (Post 1428028)
Due to my starsign I am a greedy human being :mrgreen:, so I have 2 more "requests" :):

1. highlight dead survivors(prefix "-" and Name in other color): "- Skorpion1976"
2. highlight TANKS (postfix "(TANK)" after the infected name.


Ha, aren't we all greedy? :shock:

You were kind of on the right track, but the PlayerBot[j] is a boolean variable in an array. j is the actual client index at that point that you would want to use for checking properties against.

The panel is very limited about colors. It does not do the colors like chat, the yellow lines are only there because they are items that can be selected with a keypress.

How about an asterisk (*) for the dead ones? and [Tank] for the tank?

seattle_ice 03-05-2011 15:01

Re: L4D2 Player Switch Menu and Team Panel
 
Ok, Skorp, version 1.1.8 is available to try out. Let me know how it works out.

Skorpion1976 03-06-2011 06:17

Re: L4D2 Player Switch Menu and Team Panel
 
thanks! I am testing this very moment :mrgreen:
Both works fine! I could test it only with 1 tank so far. "Judging" :) from the code it should add the postfix to everyone who is tank, right?

Question: Do you also see an ID value after a REAL players name, like this: "Skorpion1976 (1)", in the teams panel? Is this the Client ID? Any clue why this is visible?

seattle_ice 03-06-2011 16:45

Re: L4D2 Player Switch Menu and Team Panel
 
Quote:

Originally Posted by Skorpion1976 (Post 1428647)
it should add the postfix to everyone who is tank, right?

Question: Do you also see an ID value after a REAL players name, like this: "Skorpion1976 (1)", in the teams panel? Is this the Client ID? Any clue why this is visible?

It should add the [Tank] suffix to any players that are a tank at that moment.

I show the id primarily because for many of our server/plugin/admin functions, it is much easier to type "3" than "-=BwA=- IHaveALongDorkyName" as the argument, so it allows me to see the clientid's for the players easily.

I could probably add a convar to allow you to turn it on or off, or you could just modify the code if you want.

Skorpion1976 03-07-2011 10:40

Re: L4D2 Player Switch Menu and Team Panel
 
I want to turn it off. What do I have to change in the code to not show the (1) anymore?

PpZ | Iconoclast 03-07-2011 11:00

Re: L4D2 Player Switch Menu and Team Panel
 
I'm wondering if there is any way you can disable the messages that appear in the chatbox when players are switched?

For some reason I sometimes get switched to the other team when the next chapter loads and I have to use the "Swap Two Players" function to switch myself with whoever got put on my team...it works great, but it makes a few lines appear in the chatbox, saying that "PlayerX was switched with PlayerY", etc.

Is there some way that you can disable (or have a cvar that will disable) this text from appearing at all in the chatbox?

Skorpion1976 03-07-2011 11:05

Re: L4D2 Player Switch Menu and Team Panel
 
you could comment the corresponding lines out, by // PrintToChat...
Simply copy parts of the chat into the search window in your editor and look for the corresponding code line. then you put "//" in front of the Print... .

Edit:

PrintToChatAll("\x03[JBTP]\x01 \x04%N \x01has been swapped with \x04%N", swapplayer1, swapplayer2);
change to:
//PrintToChatAll("\x03[JBTP]\x01 \x04%N \x01has been swapped with \x04%N", swapplayer1, swapplayer2);

Same for all other "PrintToChat..." in the code.

PpZ | Iconoclast 03-07-2011 11:08

Re: L4D2 Player Switch Menu and Team Panel
 
Quote:

Originally Posted by Skorpion1976 (Post 1429315)
you could comment the corresponding lines out, by // PrintToChat...
Simply copy parts of the chat into the search window in your editor and look for the corresponding code line. then you put "//" in front of the Print... commands.

Edit:

PrintToChatAll("\x03[JBTP]\x01 \x04%N \x01has been swapped with \x04%N", swapplayer1, swapplayer2);
change to:
//PrintToChatAll("\x03[JBTP]\x01 \x04%N \x01has been swapped with \x04%N", swapplayer1, swapplayer2);

Hey...thanks for the tip! I don't actually know anything when it comes to coding though...is there a way this could be added in a future update! I would love that! :)

Skorpion1976 03-07-2011 11:12

Re: L4D2 Player Switch Menu and Team Panel
 
Broadcasting information to players can be considered as spam or crucial. Depends on what and how often something gets written in the chat. I donīt know any plugin which allows me to switch the PrintToChat(All) statements on or off, like a switch. But that does not mean it is not possible. You as an admin can swap yourself with someone else, so you know that you got swapped. If you swap 2 guys who donīt know what happened, they should have at least the possibility to see in the chat that they got swapped :)

PpZ | Iconoclast 03-07-2011 11:25

Re: L4D2 Player Switch Menu and Team Panel
 
Quote:

Originally Posted by Skorpion1976 (Post 1429319)
You as an admin can swap yourself with someone else, so you know that you got swapped. If you swap 2 guys who donīt know what happened, they should have at least the possibility to see in the chat that they got swapped :)

I agree - which is why I only use the Swap feature when I need to - in other words, if I or someone on my team gets swapped to the enemy team between rounds unintentionally, then it's certainly a handy ability to have. I do not use it to switch players whenever I feel like it.

I have two main reasons for not wanting the text to appear in the chatbox the way it currently does:
1) Every time I swap two players, it fills 3 lines of text in the chatbox...and instead of being as simple as "PlayerX was switched with PlayerY", it has coloured text (synonymous with a modded server - which not very many people like) and looks a lot more wordy and also has plugin tags that precede the text. In other words, yes, it looks very much like spam.
2) I find that there's a surprising number of people who use some sort of hack or aimbot/aim-assist in L4D2 these days...but these kind of people usually leave the server if they know an admin is online. I'd much rather wait until I've seen enough proof to kick/ban them from the server than have them leave and go do the same thing somewhere else.

That is why I would like to be able to completely disable the chatbox text when swapping two players.

Or, if it is easier, could you just change the message that gets put in the chatbox to this:

Quote:

"x" was swapped with "y"
Where "x" and "y" are obviously replaced with the names of the players being switched - no plugin tags, and no text colours...just a simple line of text just like that?

seattle_ice 03-07-2011 12:29

Re: L4D2 Player Switch Menu and Team Panel
 
Quote:

Originally Posted by PpZ | Iconoclast (Post 1429326)
.... Where "x" and "y" are obviously replaced with the names of the players being switched - no plugin tags, and no text colours...just a simple line of text just like that?

I will consider adding a convar "switch" for the messages.

seattle_ice 03-09-2011 12:15

Re: L4D2 Player Switch Menu and Team Panel
 
Iconoclast (and anyone else that wants it), I added a new cvar to control the format and frequency of the chat messages.

[ADDED] - cvar 'l4d2_BwA_Print_Chat_MsgType'

Determine the type and frequency of information printed to the in game chat [0 = none|1 = simple messages|2 = verbose color coded messages]

The plugin does not create a config, so just add it to your server.cfg.

PpZ | Iconoclast 03-09-2011 12:18

Re: L4D2 Player Switch Menu and Team Panel
 
Can't thank you enough mate. I'll install this on my server and give it a test drive later tonight. Cheers!

Skorpion1976 03-10-2011 10:24

Re: L4D2 Player Switch Menu and Team Panel
 
Now all I am asking for is a response please regarding my post #23 :)

seattle_ice 03-10-2011 13:02

Re: L4D2 Player Switch Menu and Team Panel
 
Quote:

Originally Posted by Skorpion1976 (Post 1430827)
Now all I am asking for is a response please regarding my post #23 :)

Skorpion: Part of the reason I show the clientID is to help differentiate between players and bots also. I will add a convar to allow you to turn them off if you wish, though.

New version posted. 1.2.0

l4d2_BwA_Show_ClientID - "Show the clientid next to the player name in the panel [0 = No|1 = Yes], Default = 1.

PpZ | Iconoclast 03-11-2011 22:27

Re: [L4D2] Player Switch Menu and Team Panel v1.2.0
 
I added this line to my server.cfg:

Quote:

l4d2_BwA_Print_Chat_MsgType 0
But it still uses the verbose/coloured text when I swap players :/

seattle_ice 03-11-2011 23:02

Re: [L4D2] Player Switch Menu and Team Panel v1.2.0
 
Quote:

Originally Posted by PpZ | Iconoclast (Post 1431746)
I added this line to my server.cfg:



But it still uses the verbose/coloured text when I swap players :/

I will check it out tomorrow.

seattle_ice 03-12-2011 01:29

Re: [L4D2] Player Switch Menu and Team Panel v1.2.0
 
Iconoclast:

I just left one line out when I edited the last version. It should be good now if you just re-download the plugin.

Skorpion1976 03-12-2011 08:43

Re: [L4D2] Player Switch Menu and Team Panel v1.2.0
 
Works fine! There is only one last thing that this plugin "should" check before allowing someone to switch to the other team: player count of destination team.

Before the switch takes place, it would be cool if there was a check, that counts the players on the destination team. If player count (dest. team) > player count (current team) --> no switch. A simple PrintToChat(client,...), which informs the player that the switch cannot be performed due to balance. The check only needs to be performed for regconsolecmds, not for admin cmds, and for the panel where you can press 2 or 3.

When the servers are full, this is not necessary, but when 50-75% full, players tend to fill one team, so itīs like 10vs4, instead 7vs7.

seattle_ice 03-12-2011 12:07

Re: [L4D2] Player Switch Menu and Team Panel v1.2.0
 
Quote:

Originally Posted by Skorpion1976 (Post 1431973)
Works fine! There is only one last thing that this plugin "should" check before allowing someone to switch to the other team: player count of destination team.

Before the switch takes place, it would be cool if there was a check, that counts the players on the destination team. If player count (dest. team) > player count (current team) --> no switch. A simple PrintToChat(client,...), which informs the player that the switch cannot be performed due to balance. The check only needs to be performed for regconsolecmds, not for admin cmds, and for the panel where you can press 2 or 3.

When the servers are full, this is not necessary, but when 50-75% full, players tend to fill one team, so itīs like 10vs4, instead 7vs7.


It already checks if the teams are full before switching. And as much as I like to accommodate as many peeps as possible, I am not going to change this to a team balancing thing, that is not its intended use. Although if you really wanted it, I might be talked into making the change in a version just for you.

PpZ | Iconoclast 03-12-2011 12:20

Re: [L4D2] Player Switch Menu and Team Panel v1.2.0
 
Quote:

Originally Posted by seattle_ice (Post 1431799)
Iconoclast:

I just left one line out when I edited the last version. It should be good now if you just re-download the plugin.

Great! I'll upload the new version and give it a try! Cheers! :)

seattle_ice 03-14-2011 18:08

Re: [L4D2] Player Switch Menu and Team Panel v1.2.0
 
I added one small console command as a favor, but I am not going to update the version for it.

It is "jointeam". It will automatically choose the team with less players, or if equal, a random selection for you to join.

It is not affected by the allow pubs convar so you can turn off the other join commands and leave this one operational if you wish.


All times are GMT -4. The time now is 04:27.

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