AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D2] Play on Team 4 (https://forums.alliedmods.net/showthread.php?t=311185)

Xanaguy 10-06-2018 19:45

[L4D2] Play on Team 4
 
1 Attachment(s)
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).

theproperson 10-06-2018 21:27

Re: [L4D2] Play on Team 4
 
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.

Xanaguy 10-06-2018 23:16

Re: [L4D2] Play on Team 4
 
Quote:

Originally Posted by theproperson (Post 2618612)
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 10-06-2018 23:53

Re: [L4D2] Play on Team 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.

mikaelangelis 10-07-2018 01:23

Re: [L4D2] Play on Team 4
 
speaking of playing infected in coop, do you know how posssible to make survivor auto move to infected team when they die?

Xanaguy 10-07-2018 01:39

Re: [L4D2] Play on Team 4
 
Quote:

Originally Posted by mikaelangelis (Post 2618625)
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.

theproperson 10-07-2018 02:50

Re: [L4D2] Play on Team 4
 
Quote:

Originally Posted by Xanaguy (Post 2618618)
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.

Xanaguy 10-07-2018 02:55

Re: [L4D2] Play on Team 4
 
Quote:

Originally Posted by theproperson (Post 2618633)
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.)

Psyk0tik 10-07-2018 04:28

Re: [L4D2] Play on Team 4
 
1 Attachment(s)
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.

Xanaguy 10-07-2018 04:35

Re: [L4D2] Play on Team 4
 
Quote:

Originally Posted by Crasher_3637 (Post 2618643)

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.


All times are GMT -4. The time now is 19:48.

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