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


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

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