Raised This Month: $77 Target: $400
 19% 

Disable death check plugin edit


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kewie
Junior Member
Join Date: Jan 2025
Old 01-13-2025 , 22:04   Disable death check plugin edit
Reply With Quote #1

There is a plugin that disables the death check, it works well, but I need a plugin that doesn't restart the game even if all players die.

I'm using a respawn plugin, with only two survivors, usually both survivors die at the same time, and respawn doesn't work because the game is restarting.
kewie is offline
little_froy
Senior Member
Join Date: May 2021
Old 01-13-2025 , 22:07   Re: Disable death check plugin edit
Reply With Quote #2

sm_cvar director_no_death_check "1"
little_froy is offline
kewie
Junior Member
Join Date: Jan 2025
Old 01-14-2025 , 00:53   Re: Disable death check plugin edit
Reply With Quote #3

Quote:
Originally Posted by little_froy View Post
sm_cvar director_no_death_check "1"
this only works for incap, I need it for death
I want to avoid mission lost when I die

Last edited by kewie; 01-14-2025 at 00:55.
kewie is offline
little_froy
Senior Member
Join Date: May 2021
Old 01-14-2025 , 01:29   Re: Disable death check plugin edit
Reply With Quote #4

Quote:
Originally Posted by kewie View Post
this only works for incap, I need it for death
I want to avoid mission lost when I die
it works for death, you can try it.
little_froy is offline
kewie
Junior Member
Join Date: Jan 2025
Old 01-14-2025 , 15:32   Re: Disable death check plugin edit
Reply With Quote #5

Quote:
Originally Posted by little_froy View Post
it works for death, you can try it.
It didn't work, I need to disable mission failure when all players and bots die.

I found this when I searched on Google:
------
To disable "mission lost" in Left 4 Dead 2, you need to access the console and use the cheat command "sv_cheats 1" followed by "director_override_mission_failure 0"; this essentially prevents the game from registering a mission failure, allowing you to continue playing even if your team would normally lose.
------
Seems to be what I'm looking for but it's an unknown command.
kewie is offline
Grey83
Veteran Member
Join Date: Dec 2014
Location: Ukraine
Old 01-14-2025 , 17:04   Re: Disable death check plugin edit
Reply With Quote #6

Quote:
Originally Posted by kewie View Post
Seems to be what I'm looking for but it's an unknown command.
sm_cvar director_override_mission_failure 0
__________________
Grey83 is offline
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 01-15-2025 , 08:12   Re: Disable death check plugin edit
Reply With Quote #7

Quote:
Originally Posted by kewie View Post
It didn't work, I need to disable mission failure when all players and bots die.

I found this when I searched on Google:
------
To disable "mission lost" in Left 4 Dead 2, you need to access the console and use the cheat command "sv_cheats 1" followed by "director_override_mission_failure 0"; this essentially prevents the game from registering a mission failure, allowing you to continue playing even if your team would normally lose.
------
Seems to be what I'm looking for but it's an unknown command.
Is there a such cvar exist?
Code:
sm_cvar director_override_mission_failure
[SM] Unable to find cvar: director_override_mission_failure
https://developer.valvesoftware.com/..._and_variables
__________________

Last edited by HarryPotter; 01-15-2025 at 08:12.
HarryPotter is offline
kewie
Junior Member
Join Date: Jan 2025
Old 01-16-2025 , 01:24   Re: Disable death check plugin edit
Reply With Quote #8

Quote:
Originally Posted by HarryPotter View Post
Is there a such cvar exist?
Code:
sm_cvar director_override_mission_failure
[SM] Unable to find cvar: director_override_mission_failure
https://developer.valvesoftware.com/..._and_variables
same here
kewie is offline
101
Senior Member
Join Date: Nov 2023
Old 01-24-2025 , 10:48   Re: Disable death check plugin edit
Reply With Quote #9

if you are using an open source plugin ,it is better to share the code . or use this for test :
"this is a simple structure of an un-released plugin without a huge details"
PHP Code:
#include <sdktools>

Handle Plugin_Handle[3];
float LastValidPos[3];

public 
OnPluginStart()
{
    
StartPrepSDKCall(SDKCall_Player);
    if (!
PrepSDKCall_SetSignature(SDKLibrary_Server,"\x56\x8B\xF1\xE8\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x84\xC0\x75",16)
    && !
PrepSDKCall_SetSignature(SDKLibrary_Server,"\x56\x8B\xF1\xE8\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x84\xC0\x75",16)
    && !
PrepSDKCall_SetSignature(SDKLibrary_Server"@_ZN13CTerrorPlayer12RoundRespawnEv",0))
        
SetFailState("SetSignature [RoundRespawn] : Unable to find address.");
    
Plugin_Handle[0] = EndPrepSDKCall();


    
Plugin_Handle[1] = FindConVar("director_no_death_check");

    
HookConVarChange(Plugin_Handle[1] , On_Death_Check_Changed);
    if (
GetConVarInt(Plugin_Handle[1]))    Check(true);
}

public 
On_Death_Check_Changed(ConVar convar, const char[] oldValue, const char[] newValue)
{
    if (
StringToInt(newValue) && !StringToInt(oldValue))    Check(true);
    if (!
StringToInt(newValue) && StringToInt(oldValue))    Check(false);    
}

Check(bool Enable)
{
    if (
Enable)
    {
        
Plugin_Handle[2] = CreateConVar("director_no_death_respawn_time""5.0""time in seconds before re-spawn"FCVAR_NONE true0.1);
        
HookEvent("player_activate",event_activate);
        
HookEvent("round_start"event_round_start);
        
HookEvent("player_death"event_player_death);
        
RestartRound();
    }
    else
    {
        
UnhookEvent("player_activate",event_activate);
        
UnhookEvent("round_start"event_round_start);
        
UnhookEvent("player_death"event_player_death);
        
LastValidPos = {0.0 0.0 0.0};
        
delete Plugin_Handle[2];
    }
}

RestartRound(){
    
ServerCommand("sm_cvar endround");//ServerCommand("sm_cvar mp_restartgame 1");
}

public 
event_activate(Handle eventchar[] event_namebool dontBroadcast){
    
CreateTimerGetConVarFloat(Plugin_Handle[2]) ,Timer_Respawn GetClientOfUserId(GetEventInt(event"userid")) ,TIMER_FLAG_NO_MAPCHANGE);
}

public 
event_round_start(Handle eventchar[] event_namebool dontBroadcast){
    
LastValidPos = {0.0 0.0 0.0};
}

public 
event_player_death(Handle eventchar[] event_namebool dontBroadcast)
{
    
int client GetClientOfUserId(GetEventInt(event"userid"));

    if (
client && GetClientTeam(client) == 2)
    {
        if ( 
GetEntityFlags(client) & FL_ONGROUND || !(GetEventInt(event"type") & 1048608) ) //  1048608 : DMG_FALL|DMG_CHOKE (no much exp in l4d2 so you can add more filters)
            
GetClientAbsOrigin(clientLastValidPos);
        
CreateTimerGetConVarFloat(Plugin_Handle[2]) ,Timer_Respawn ,client TIMER_FLAG_NO_MAPCHANGE);
    }
}

public 
Action Timer_Respawn(Handle timerany client)
{
    if (
IsClientInGame(client) && GetClientTeam(client) == && !IsPlayerAlive(client)){
    {
        
SDKCall(Plugin_Handle[0], client);
        if  (
LastValidPos[0])
            
TeleportEntity(clientLastValidPos NULL_VECTORNULL_VECTOR);
    }
    return 
Plugin_Handled;

* time to re-spawn dead survivors is 5 seconds by default controlled by director_no_death_respawn_time .
* no round failure , survivors are unstoppable .
* the plugin won't work unless director_no_death_check is "1"
* I think it is meaningless to keep re-spawning dead players without any limit , as I don't have much exp. in l4d2 , but let me know if : a round time limit is required ?! or if you want to add something .

btw ,
It is likely that the plugin you are using is manually terminating the round after death , in other words : it cheats on director to achieve only one benefit which is : skipping [incap fail status] .
then it takes the death check on its own and end the round manually when all players are dead .

I'm sure that it is not in the cvar director_no_death_check .
because if it was enabled , then it would force the director to ignore the survivors fail status [whatever is the case] . so that when all survivors fall down on the ground or die the director acts like (I didn't see anything) .
As a result , the round won't end automatically , and the scenario of mission failure will never be called .
https://developer.valvesoftware.com/...ing%20scenario
101 is offline
kewie
Junior Member
Join Date: Jan 2025
Old 01-25-2025 , 05:11   Re: Disable death check plugin edit
Reply With Quote #10

Thanks everyone, I'm using the github respawn plugin, and I found another plugin to control incap's behavior.

about that command, apparently the google search generated an answer by AI, I looked for it and didn't find any information about cvar.
kewie 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 11:41.


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