Raised This Month: $32 Target: $400
 8% 

[L4D2] Player Switch Menu and Team Panel v1.2.1


Post New Thread Reply   
 
Thread Tools Display Modes
seattle_ice
Member
Join Date: Dec 2010
Old 02-23-2011 , 17:31   Re: L4D2 Player Switch Menu and Team Panel
Reply With Quote #11

Quote:
Originally Posted by nicoh93 View Post
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 View Post
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.

Last edited by seattle_ice; 02-24-2011 at 12:28.
seattle_ice is offline
seattle_ice
Member
Join Date: Dec 2010
Old 02-23-2011 , 19:38   Re: L4D2 Player Switch Menu and Team Panel
Reply With Quote #12

Quote:
Originally Posted by PpZ | Iconoclast View Post
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.
seattle_ice is offline
PpZ | Iconoclast
Senior Member
Join Date: Feb 2008
Old 02-23-2011 , 19:55   Re: L4D2 Player Switch Menu and Team Panel
Reply With Quote #13

Quote:
Originally Posted by seattle_ice View Post
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!
__________________
PpZ | Iconoclast is offline
Skorpion1976
Veteran Member
Join Date: Jun 2009
Location: Austria
Old 02-27-2011 , 08:53   Re: L4D2 Player Switch Menu and Team Panel
Reply With Quote #14

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?

Last edited by Skorpion1976; 02-27-2011 at 10:07.
Skorpion1976 is offline
Skorpion1976
Veteran Member
Join Date: Jun 2009
Location: Austria
Old 02-27-2011 , 09:54   Re: L4D2 Player Switch Menu and Team Panel
Reply With Quote #15

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
Attached Thumbnails
Click image for larger version

Name:	c8m5_rooftop0001.jpg
Views:	576
Size:	90.9 KB
ID:	82939  

Last edited by Skorpion1976; 02-27-2011 at 10:39.
Skorpion1976 is offline
seattle_ice
Member
Join Date: Dec 2010
Old 02-27-2011 , 15:29   Re: L4D2 Player Switch Menu and Team Panel
Reply With Quote #16

Quote:
Originally Posted by Skorpion1976 View Post
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 View Post
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 View Post
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 View Post
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.




Last edited by seattle_ice; 02-27-2011 at 15:53.
seattle_ice is offline
seattle_ice
Member
Join Date: Dec 2010
Old 02-27-2011 , 17:04   Re: L4D2 Player Switch Menu and Team Panel
Reply With Quote #17

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.

Last edited by seattle_ice; 02-27-2011 at 17:26.
seattle_ice is offline
Skorpion1976
Veteran Member
Join Date: Jun 2009
Location: Austria
Old 03-05-2011 , 07:14   Re: L4D2 Player Switch Menu and Team Panel
Reply With Quote #18

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 , 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?
Skorpion1976 is offline
seattle_ice
Member
Join Date: Dec 2010
Old 03-05-2011 , 14:37   Re: L4D2 Player Switch Menu and Team Panel
Reply With Quote #19

Quote:
Originally Posted by Skorpion1976 View Post
Due to my starsign I am a greedy human being , 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?

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?

Last edited by seattle_ice; 03-05-2011 at 15:04.
seattle_ice is offline
seattle_ice
Member
Join Date: Dec 2010
Old 03-05-2011 , 15:01   Re: L4D2 Player Switch Menu and Team Panel
Reply With Quote #20

Ok, Skorp, version 1.1.8 is available to try out. Let me know how it works out.
seattle_ice is offline
Reply


Thread Tools
Display Modes

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 21:10.


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