Raised This Month: $51 Target: $400
 12% 

[L4D2] Play on Team 4


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Xanaguy
Senior Member
Join Date: Jan 2017
Plugin ID:
6293
Plugin Version:
1.0
Plugin Category:
Admin Commands
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Ever wanted to support the main team (Team 2) as The Passing's L4D1 Survivors? Now you can!
    Old 10-06-2018 , 19:45   [L4D2] Play on Team 4
    Reply With Quote #1

    The first plugin in my knowledge to achieve the ability to swap to the hidden team is "[L4D2] ABM: A MultiSlots / SuperVersus Alternative" by NgBUCKWANGS. However, his latest version has unintentionally blocked the ability to do so (yes, I followed the steps in all versions of ABM like he instructed long ago) . Which is why I adapted MasterMe's "[L4D(2)] AFK and Join Team Commands (1.1)" plugin to grant server admins that ability again.

    This plugin will grant server admins the ability to join any non-spectating team.

    - !team2 (Joins the main survivor team via "jointeam2")
    - !team3 (Joins the infected team via "jointeam 3", only functional in versus modes)
    - !team4 (Joins the L4D1 Survivor exclusive team, works on all modes and any maps. Additional notes will follow.)
    -!spec (Will force you to Spectate if you’re on Team 4. This is an emergency exit to avoid getting kicked out of the game if you happen to be Zoey, Louis, or Francis on c6m3_port. And if team 2 fails the match. It won’t happen on finale wins.)
    ToDo:

    - Fix c6m3_port finale to where the players on team 4 won't get kicked when the round ends (in failure, coop only). (Done via cmd, need to do it on “round_end”

    Team 4's notes:

    - You will spawn in the starting area.

    - No music will play other than the idle theme.

    - You cannot use any radial menus. Admin menus are unaffected.

    - When starting the new chapter via transitioning, you will be spectating. Join Team 2, then Team 4 again to play as the supporting team again (make sure you're not idle).

    - You are not required to be with the main survivor team for certain events that needs "Everyone to be ready". This includes moving to the escape vehicle.

    - Your damage towards the Tank on Team 4 will qualify for the "Kite Like A Man" Achievement.

    - (c6m3_port finale only) You won't have any outlines. This won't be the case for other maps that spawns L4D1 survivors in this fashion.

    - Team 4 Bots are invincible (c6m3_port on campaign or [L4D2] Survivor Bot Holdout (1.3)), Players on Team 4 are not.

    - Team 4 Players can still take damage, heal, and be brought back with a defibrillator.

    - Team 4 Players has an inventory just like Team 2, but they cannot drop items like the bots do. A clever edit of another plugin remedies that.

    - Team 4 will not have a survivor hud, but they can see other player SI's health via hud if in versus modes.

    - All Infected (with the exception of Player SI) will ignore you unless biled on. Player SI will see your health glow like the other survivors. Bot SI will still hit you if you are in their way (in front of them).

    - If all (4) Team 4 slots are occupied, no other player can join Team 4, this includes bots on Team 4.

    - The character selection is ultimately random when joining Team 4. A bot can be kicked to make that character/slot available.

    - If all of Team 2 dies in Coop modes (not survival), quickly change back to Team 2 to avoid getting kicked from your own game via console (This applies only to c6m3_port, Bill is the only exception.) I will fix it soon.

    - Scavenge round transitions are okay, but will prevent you from equipping different items from your inventory.

    - Survival rounds are okay.

    - Versus rounds are okay, but you may be glitched with weapon visuals on team swaps (finale_wins confirmed).

    - You will not be able to vote to skip the credits unless you're on team 2, but you can vote for other things as if you are on the main team (exclusive to that team)

    - You won't have FPS arms in Team 4. Third person views are just fine.

    - Shooting Team 2 as Team 4 will not be counted as friendly fire, but Team 2 can still damage Team 4 Players.

    - Lastly, Team 4 can see all players, human and bot through walls.

    Upgrades:

    - You needn't worry about vs team switching limits anymore. Swap teams as much as you want.

    - Thanks, Spirit_12 for making optimizations.

    - Added two secret commands for non admins to switch between Team 4 and Team 2, these are meant for easter egg purposes.

    - Added emergency exit for those in Team 4 via command to quickly spectate the game before they were kicked by console (This applies only in one map, that would be c6m3_port).

    - Fixed team switching errors. Everything should be just fine now. Thanks again, Spirit_12.

    With the Client 0 Index issue out of the way, I still cannot support admins using those commands on other players yet. Admins would have to act fast in order to save those on team 4 from being kicked on round end (including themselves! Of course, they would have to fail c6m3_port on coop/campaign for that to happen).
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d2_team4.sp - 1709 views - 1.8 KB)

    Last edited by Xanaguy; 10-10-2018 at 02:48. Reason: Updated plugin
    Xanaguy is offline
    theproperson
    Member
    Join Date: Feb 2017
    Old 10-06-2018 , 21:27   Re: [L4D2] Play on Team 4
    Reply With Quote #2

    Thank you for this beautiful plugin that offers a new area for us to play around with. Pretty much opens up the ability to make 2 separate survivor teams in a game without everyone being bunched together like super versus does.

    I'm just wondering though, would it be possible for you to allow us to swap to the infected team in co-op? That feature is basicly the only reason I'm using a super old / outdated version of super versus instead of the updated and fixed versions. I don't know what people were talking about with crashes from it, I have never once crashed in the years I've been using super versus and playing as an infected in co-op games. If you can, I could delete that old plugin and put full support towards only using yours.
    theproperson is offline
    Xanaguy
    Senior Member
    Join Date: Jan 2017
    Old 10-06-2018 , 23:16   Re: [L4D2] Play on Team 4
    Reply With Quote #3

    Quote:
    Originally Posted by theproperson View Post
    Thank you for this beautiful plugin that offers a new area for us to play around with. Pretty much opens up the ability to make 2 separate survivor teams in a game without everyone being bunched together like super versus does.

    I'm just wondering though, would it be possible for you to allow us to swap to the infected team in co-op? That feature is basicly the only reason I'm using a super old / outdated version of super versus instead of the updated and fixed versions. I don't know what people were talking about with crashes from it, I have never once crashed in the years I've been using super versus and playing as an infected in co-op games. If you can, I could delete that old plugin and put full support towards only using yours.
    Thanks! I got one fix on it's way soon. Another I will need help with.

    As for playing as Infected in Coop, I recommend the latest github version of ABM which its original post is linked above. Admins are then able to play as an infected in Coop game modes.
    Xanaguy is offline
    Xanaguy
    Senior Member
    Join Date: Jan 2017
    Old 10-06-2018 , 23:53   Re: [L4D2] Play on Team 4
    Reply With Quote #4

    BugFix Request: I get the Client 0 Error when attempting to swap teams on versus, but when I fixed that issue, the commands wont even work at all.

    Secondly, which ties in, I need to define "client" in order for me to force a team swap when the game ends. Must be hooked to event.

    If anyone can help, the source code is on the main post. Thanks!

    For now, if anyone is having trouble switching between teams in versus (mainly 2 and 3), please use ABM linked above.

    Last edited by Xanaguy; 10-07-2018 at 00:09.
    Xanaguy is offline
    mikaelangelis
    Senior Member
    Join Date: Oct 2017
    Old 10-07-2018 , 01:23   Re: [L4D2] Play on Team 4
    Reply With Quote #5

    speaking of playing infected in coop, do you know how posssible to make survivor auto move to infected team when they die?
    mikaelangelis is offline
    Xanaguy
    Senior Member
    Join Date: Jan 2017
    Old 10-07-2018 , 01:39   Re: [L4D2] Play on Team 4
    Reply With Quote #6

    Quote:
    Originally Posted by mikaelangelis View Post
    speaking of playing infected in coop, do you know how posssible to make survivor auto move to infected team when they die?
    Best plugin I have as a match is this one.

    Please use ABM to swap between teams 2 and 3 in offline coop games.

    If anyone can still help me out, please refer to the original plugin and its latest post.

    Last edited by Xanaguy; 10-07-2018 at 03:06. Reason: Updated plugin
    Xanaguy is offline
    theproperson
    Member
    Join Date: Feb 2017
    Old 10-07-2018 , 02:50   Re: [L4D2] Play on Team 4
    Reply With Quote #7

    Quote:
    Originally Posted by Xanaguy View Post
    Thanks! I got one fix on it's way soon. Another I will need help with.

    As for playing as Infected in Coop, I recommend the latest github version of ABM which its original post is linked above. Admins are then able to play as an infected in Coop game modes.
    Seems I'm going to be stuck with super versus then. My goal was kind of to have a simplified team changer like yours as a full package and not need support from anything else. Oh well, thank you for the reply and the great work you did. Everything has worked fully functional for me through your plugins use. Have not had an issues , error logs , crashes or etc.

    Last edited by theproperson; 10-07-2018 at 02:51. Reason: Needed to be more specific.
    theproperson is offline
    Xanaguy
    Senior Member
    Join Date: Jan 2017
    Old 10-07-2018 , 02:55   Re: [L4D2] Play on Team 4
    Reply With Quote #8

    Quote:
    Originally Posted by theproperson View Post
    Seems I'm going to be stuck with super versus then. My goal was kind of to have a simplified team changer like yours as a full package and not need support from anything else. Oh well, thank you for the reply and the great work you did. Everything has worked fully functional for me through your plugins use. Have not had an issues , error logs , crashes or etc.
    Might be because you're playing online. Which is fair enough. I'll re-update the plugin to have it's original commands. I was in a single-player game at the time.

    It's updated now.

    Edit 2: Well, ABM alone can pretty much let players be Infected in Coop. The Team 4 Plugin here just adds the ability to join Team 4 without changing critical stuff from ABM, they both work together.. Sorry for the wrong wording. (You dont even need to do the other commands on this plugin, as ABM does the job better.)

    Last edited by Xanaguy; 10-07-2018 at 03:36. Reason: Updated plugin
    Xanaguy is offline
    Psyk0tik
    Veteran Member
    Join Date: May 2012
    Location: Homeless
    Old 10-07-2018 , 04:28   Re: [L4D2] Play on Team 4
    Reply With Quote #9

    PHP Code:
    #include <sourcemod>

    #pragma semicolon 1
    #pragma newdecls required

    #define PLUGIN_VERSION "1.0"

    public Plugin myinfo =
    {
        
    name "[L4D2] Play as Team 4",
        
    author "Xanaguy/MasterMe",
        
    description "Play on the hidden Team 4!",
        
    version PLUGIN_VERSION,
        
    url "https://forums.alliedmods.net/showthread.php?t=311185"
    };

    public 
    void OnPluginStart()
    {
        
    CreateConVar("team4version"PLUGIN_VERSION"\"Play as Team 4\" plugin version"FCVAR_NOTIFY|FCVAR_DONTRECORD);

        
    RegAdminCmd("sm_team4"ClientToTeam4ADMFLAG_ROOT"Switch to Team 4.");
        
    RegAdminCmd("sm_team3"ClientToTeam3ADMFLAG_ROOT"Switch to Team 3.");
        
    RegAdminCmd("sm_team2"ClientToTeam2ADMFLAG_ROOT"Switch to Team 2.");
    }

    public 
    Action ClientToTeam4(int clientint args)
    {
        if (!
    bIsValidClient(client))
        {
            
    ReplyToCommand(client"[PT4] You must be in-game to use this command.");
            return 
    Plugin_Handled;
        }

        
    ChangeClientTeam(client4);

        return 
    Plugin_Handled;
    }

    public 
    Action ClientToTeam2(int clientint args)
    {
        if (!
    bIsValidClient(client))
        {
            
    ReplyToCommand(client"[PT4] You must be in-game to use this command.");
            return 
    Plugin_Handled;
        }

        
    FindConVar("vs_max_team_switches").SetInt(9999);
        
    ClientCommand(client"jointeam 2");
        
    FindConVar("vs_max_team_switches").SetInt(1);

        return 
    Plugin_Handled;
    }

    public 
    Action ClientToTeam3(int clientint args)
    {
        if (!
    bIsValidClient(client))
        {
            
    ReplyToCommand(client"[PT4] You must be in-game to use this command.");
            return 
    Plugin_Handled;
        }

        
    FindConVar("vs_max_team_switches").SetInt(9999);
        
    ClientCommand(client"jointeam 3");
        
    FindConVar("vs_max_team_switches").SetInt(1);

        return 
    Plugin_Handled;
    }

    stock bool bIsValidClient(int client)
    {
        if (
    client <= || client MaxClients || !IsClientInGame(client) || IsFakeClient(client))
        {
            return 
    false;
        }

        return 
    true;

    Maybe you could add support for letting admins target other players with the commands.
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d2_team4.sp - 780 views - 1.9 KB)
    __________________
    Psyk0tik is offline
    Xanaguy
    Senior Member
    Join Date: Jan 2017
    Old 10-07-2018 , 04:35   Re: [L4D2] Play on Team 4
    Reply With Quote #10

    Quote:
    Originally Posted by Crasher_3637 View Post

    Maybe you could add support for letting admins target other players with the commands.


    Without my planned fix (using in conjunction with yours) for automatic team swapping under certain conditions, players would get automatically kicked from the game without being able to swap teams in time.. Of course those conditions are specific, I’ll see what I can do about it, when I wake up.

    I’ll update the plugin and get to sleep, thanks Crasher. Please see the original post for more info, or if you're able to fix it.

    Updated! A problem still persists (which is why I can't support targets for the commands yet.)

    Edit1: Unfortunately, the client 0 fix did absolutely nothing for singleplayer. Maybe there can be something to remedy that.

    Last edited by Xanaguy; 10-07-2018 at 05:12. Reason: Updated Plugin
    Xanaguy is offline
    Reply



    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 11:12.


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