[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:
Player Menu Items:
Spectator Control
Console Commands
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)
1.1.6: (2/9/2011)
1.1.7: (2/27/2011)
1.1.8: (2/27/2011)
1.1.9: (2/27/2011)
1.2.0: (2/27/2011)
1.2.1: (2/27/2011)
1.2.2: (2/27/2011)
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 |
Re: L4D2 Player Switch Menu and Team Panel
l4d2_bwa_teams_panel.txt goes to?
|
Re: L4D2 Player Switch Menu and Team Panel
Quote:
Looks like signatures. Usually these go in the gamedata folder. Try that first. |
Re: L4D2 Player Switch Menu and Team Panel
Quote:
|
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.
|
Re: L4D2 Player Switch Menu and Team Panel
Quote:
|
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! |
Re: L4D2 Player Switch Menu and Team Panel
Quote:
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. |
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? :) |
Re: L4D2 Player Switch Menu and Team Panel
l4d1 compatible?
|
Re: L4D2 Player Switch Menu and Team Panel
Quote:
Quote:
|
Re: L4D2 Player Switch Menu and Team Panel
Quote:
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. |
Re: L4D2 Player Switch Menu and Team Panel
Quote:
|
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 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? |
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 |
Re: L4D2 Player Switch Menu and Team Panel
Quote:
Quote:
Quote:
Quote:
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. |
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. |
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:
PHP Code:
|
Re: L4D2 Player Switch Menu and Team Panel
Quote:
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? |
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.
|
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? |
Re: L4D2 Player Switch Menu and Team Panel
Quote:
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. |
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?
|
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? |
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. |
Re: L4D2 Player Switch Menu and Team Panel
Quote:
|
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 :)
|
Re: L4D2 Player Switch Menu and Team Panel
Quote:
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:
|
Re: L4D2 Player Switch Menu and Team Panel
Quote:
|
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. |
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!
|
Re: L4D2 Player Switch Menu and Team Panel
Now all I am asking for is a response please regarding my post #23 :)
|
Re: L4D2 Player Switch Menu and Team Panel
Quote:
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. |
Re: [L4D2] Player Switch Menu and Team Panel v1.2.0
I added this line to my server.cfg:
Quote:
|
Re: [L4D2] Player Switch Menu and Team Panel v1.2.0
Quote:
|
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. |
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. |
Re: [L4D2] Player Switch Menu and Team Panel v1.2.0
Quote:
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. |
Re: [L4D2] Player Switch Menu and Team Panel v1.2.0
Quote:
|
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 21:20. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.