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

[L4D2] Block finale rescue infinite tanks


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
JLmelenchon
Senior Member
Join Date: Mar 2019
Old 10-26-2020 , 05:01   [L4D2] Block finale rescue infinite tanks
Reply With Quote #1

Originally this plugin* blocks one of the two tank spawning in the finale event. This is not what i want to do, but i think it could be a good base for my idea except i don't know what to change.

What i want to do is blocking the extra tanks who spawn to infinity when the rescue vehicle is comming for survivors (the third tank ect) for balance purpose. I guess the "tankicount" will have to be changed to something else, also "m_bInSecondHalfOfRound" should be replaced by something like "m_bInSendInRescueVehicle" maybe ? By the way i guess it is going to create conflicts as all finales don't work the same way (dead center, the sacrifice, ect)

* the plugin in question: https://github.com/SirPlease/L4D2-Co...ank_blocker.sp

Last edited by JLmelenchon; 10-26-2020 at 06:15.
JLmelenchon is offline
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 10-26-2020 , 06:35   Re: [L4D2] Block finale rescue infinite tanks
Reply With Quote #2

Quote:
Originally Posted by JLmelenchon View Post
What i want to do is blocking the extra tanks who spawn to infinity when the rescue vehicle is comming for survivors (the third tank ect) for balance purpose.
Check here
https://github.com/fbef0102/L4D1-Com...oEscapeTank.sp

you probably need to modify since this needs old left4downtown extension
__________________

Last edited by HarryPotter; 10-26-2020 at 06:35.
HarryPotter is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 10-26-2020 , 06:49   Re: [L4D2] Block finale rescue infinite tanks
Reply With Quote #3

There is no such thing as a "m_bInSendInRescueVehicle" prop according to the datamap and netprop dumps. What you could maybe do is check for finale type 6 (Rescue vehicle is ready) and block it.

According to Left 4 DHooks' documentation for L4D2_OnChangeFinaleStage, that finale type only signals endless Hordes/Tanks, which sounds like the infinite Tanks you're referring to. Of course, this would mean that hordes will stop spawning as well so only the six special infected will spawn.

You also have the other option of blocking Tank spawns when the finale type is 6.

Here's a plugin that allows you to pick between the two options I explained. I've tested both options on Dark Carnival's finale.

Requires Left 4 DHooks: https://forums.alliedmods.net/showthread.php?t=321696
PHP Code:
#include <sourcemod>
#include <left4dhooks>

#pragma semicolon 1
#pragma newdecls required

public Plugin myinfo =
{
    
name "[L4D2] Infinite Hordes/Tanks Blocker",
    
author "Psyk0tik (Crasher_3637)",
    
description "Blocks infinite hordes/Tanks when rescue vehicle is ready.",
    
version "1.0",
    
url "https://forums.alliedmods.net/showthread.php?t=328088"
};

public 
APLRes AskPluginLoad2(Handle myselfbool latechar[] errorint err_max)
{
    if (
GetEngineVersion() != Engine_Left4Dead2)
    {
        
strcopy(errorerr_max"\"Infinite Hordes/Tanks Blocker\" only supports Left 4 Dead 2.");

        return 
APLRes_SilentFailure;
    }

    return 
APLRes_Success;
}

ConVar g_cvBlockMethod;

int g_iFinaleType;

public 
void OnPluginStart()
{
    
g_cvBlockMethod CreateConVar("l4d2_ifb_method""1""Method for blocking infinite Tanks when rescue vehicle arrives.\n0: Block infinite hordes/Tanks.\n1: Block Tanks from spawning."_true0.0true1.0);

    
AutoExecConfig(true"l4d2_infinite_finale_blocker");
}

public 
void OnMapStart()
{
    
g_iFinaleType 0;
}

public 
void OnMapEnd()
{
    
g_iFinaleType 0;
}

public 
Action L4D_OnSpawnTank(const float vecPos[3], const float vecAng[3])
{
    
// Rescue Vehicle Ready; block infinite Tank spawns
    
return (g_cvBlockMethod.BoolValue && g_iFinaleType == 6) ? Plugin_Handled Plugin_Continue;
}

public 
Action L4D2_OnChangeFinaleStage(int &finaleType, const char[] arg)
{
    if (!
g_cvBlockMethod.BoolValue && finaleType == 6)
    {
        return 
Plugin_Handled// Rescue Vehicle Ready; block change to prevent infinite hordes/Tanks
    
}

    
g_iFinaleType finaleType// Record finale type

    
return Plugin_Continue// Continue as usual

Attached Files
File Type: sp Get Plugin or Get Source (l4d2_infinite_finale_blocker.sp - 75 views - 1.7 KB)
__________________
Psyk0tik is offline
JLmelenchon
Senior Member
Join Date: Mar 2019
Old 10-28-2020 , 07:22   Re: [L4D2] Block finale rescue infinite tanks
Reply With Quote #4

This works for regular finales, perfect.
JLmelenchon is offline
sergrt14
Junior Member
Join Date: Sep 2020
Old 11-01-2020 , 20:56   Re: [L4D2] Block finale rescue infinite tanks
Reply With Quote #5

Quote:
Originally Posted by Crasher_3637 View Post
There is no such thing as a "m_bInSendInRescueVehicle" prop according to the datamap and netprop dumps. What you could maybe do is check for finale type 6 (Rescue vehicle is ready) and block it.

According to Left 4 DHooks' documentation for L4D2_OnChangeFinaleStage, that finale type only signals endless Hordes/Tanks, which sounds like the infinite Tanks you're referring to. Of course, this would mean that hordes will stop spawning as well so only the six special infected will spawn.

You also have the other option of blocking Tank spawns when the finale type is 6.

Here's a plugin that allows you to pick between the two options I explained. I've tested both options on Dark Carnival's finale.

Requires Left 4 DHooks: https://forums.alliedmods.net/showthread.php?t=321696
PHP Code:
#include <sourcemod>
#include <left4dhooks>

#pragma semicolon 1
#pragma newdecls required

public Plugin myinfo =
{
    
name "[L4D2] Infinite Hordes/Tanks Blocker",
    
author "Psyk0tik (Crasher_3637)",
    
description "Blocks infinite hordes/Tanks when rescue vehicle is ready.",
    
version "1.0",
    
url "https://forums.alliedmods.net/showthread.php?t=328088"
};

public 
APLRes AskPluginLoad2(Handle myselfbool latechar[] errorint err_max)
{
    if (
GetEngineVersion() != Engine_Left4Dead2)
    {
        
strcopy(errorerr_max"\"Infinite Hordes/Tanks Blocker\" only supports Left 4 Dead 2.");

        return 
APLRes_SilentFailure;
    }

    return 
APLRes_Success;
}

ConVar g_cvBlockMethod;

int g_iFinaleType;

public 
void OnPluginStart()
{
    
g_cvBlockMethod CreateConVar("l4d2_ifb_method""1""Method for blocking infinite Tanks when rescue vehicle arrives.\n0: Block infinite hordes/Tanks.\n1: Block Tanks from spawning."_true0.0true1.0);

    
AutoExecConfig(true"l4d2_infinite_finale_blocker");
}

public 
void OnMapStart()
{
    
g_iFinaleType 0;
}

public 
void OnMapEnd()
{
    
g_iFinaleType 0;
}

public 
Action L4D_OnSpawnTank(const float vecPos[3], const float vecAng[3])
{
    
// Rescue Vehicle Ready; block infinite Tank spawns
    
return (g_cvBlockMethod.BoolValue && g_iFinaleType == 6) ? Plugin_Handled Plugin_Continue;
}

public 
Action L4D2_OnChangeFinaleStage(int &finaleType, const char[] arg)
{
    if (!
g_cvBlockMethod.BoolValue && finaleType == 6)
    {
        return 
Plugin_Handled// Rescue Vehicle Ready; block change to prevent infinite hordes/Tanks
    
}

    
g_iFinaleType finaleType// Record finale type

    
return Plugin_Continue// Continue as usual

This is blocking in finale escape tank spawning ? or Spawning infinite tank in escape ?
sergrt14 is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 11-01-2020 , 21:16   Re: [L4D2] Block finale rescue infinite tanks
Reply With Quote #6

Quote:
Originally Posted by sergrt14 View Post
This is blocking in finale escape tank spawning ? or Spawning infinite tank in escape ?
It blocks Tanks from spawning once the rescue vehicle arrives.
__________________
Psyk0tik is offline
GsiX
gee, six eggs
Join Date: Aug 2012
Location: Land Below The Wind
Old 11-02-2020 , 22:22   Re: [L4D2] Block finale rescue infinite tanks
Reply With Quote #7

i have no knowledge in this but why not just count and kick the extra tank? they are playable char. or just slay it.. aka ask them to suicide.
GsiX is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 11-02-2020 , 23:10   Re: [L4D2] Block finale rescue infinite tanks
Reply With Quote #8

In some servers killing a tank gives "points", so it could be used as an exploit (depends on)

Crasher method prevents the spawn by checking the finale type, which is the best solution besides the l4dhooks dependency
__________________
Marttt is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 11-02-2020 , 23:10   Re: [L4D2] Block finale rescue infinite tanks
Reply With Quote #9

Quote:
Originally Posted by GsiX View Post
i have no knowledge in this but why not just count and kick the extra tank? they are playable char. or just slay it.. aka ask them to suicide.
That's an old and inefficient method. It's faster to just prevent the spawning in the first place than to keep tracking new spawns and kicking/slaying them.
__________________
Psyk0tik 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 08:35.


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