AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=109)
-   -   [L4D1 AND L4D2] Survivor Respawn (https://forums.alliedmods.net/showthread.php?t=323033)

Ernecio 04-11-2020 01:55

[L4D1 AND L4D2] Survivor Respawn
 
[L4D1 AND L4D2] Survivor Respawn

Sorry, This Plugin has been discontinued

This plugin is written about the original Mortiegama's Survivor Respawning code. At first I just wanted to make some basic changes, but checking the plugin posts I saw that there were several proposals for the plugin so I decided to make these changes for myself, and then I added other features that seemed useful to me.

Unlike the original plugin, this plugin has translations, player respawn commands on your crosshair, countdown returns on the screen, doesn't reset the player statistics when it respawn, adds a section to the main administrator menu, how much support for Left 4 Dead 1 is available, added double respawn corrections, it removes the player's body that has reappeared automatically (Left 4 Dead 2) this to try to prevent bugs with the defibrillator, new specific Cvars for L4D1 and L4D2, among other features.

Description

This plugin offers the possibility that when a player dies, a timer is created that will respawn automatically, in case this player has not already been rescued or taken a bot.

Add to the main administrator menu a section to appear players in the crosshair, or also an administrator can respawn one or several players in your crosshair with command.
(This plugin has only been designed for coop mode and therefore has only been tested in coop mode, it has also only been tested with SuperVersus version 1.8.15.5 for Left 4 Dead 1/2. This plugin include the functions of the Respawn Statistics Fixer and SM Respawn Command plugins, combining this plugin with the previous ones can cause bugs)

Commands
!respawn Respawn Target/s At Your Crosshair.
!respawnmenu Create A Menu Of Clients List And Respawn Targets At Your Crosshair.
Admin level required ADMFLAG_BAN

Credits

Mortiegama for his original code and idea.
Dragokas And SilverShot for their Respawn Statistics Fixer code.
AtomicStryker for his code in SM Respawn command.
Thank you very much for theirs plugins and original ideas.

Current languages
- English
- Chinese (Thanks to fbef0102 for the support)
- Hungarian (Thanks to KasperH for the support)
- Spanish
- Simplified Chinese (Thanks to fbef0102 for the support)
- Russian (Thanks to KRUTIK for the support)

ConVars

PHP Code:

// Respawn bots if is dead in case of using Take Over.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_survivorrespawn_botreplaced "1"

// Amount of times a Survivor can respawn before permanently dying (Def 2)
// -
// Default: "2"
// Minimum: "0.000000"
l4d_survivorrespawn_deathlimit "2"

// Enables Survivors to respawn automatically when incapped and/or killed (Def 1)
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_survivorrespawn_enable "1"

// Allows Bots to respawn automatically when incapped and/or killed (Def 1)
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_survivorrespawn_enablebot "1"

// Survivors will be killed when hanging and respawn afterwards (Def 1)
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_survivorrespawn_hanging "0"

// How many seconds till the Survivor is killed while hanging (Def 25)
// -
// Default: "25"
// Minimum: "0.000000"
l4d_survivorrespawn_hangingdelay "25"

// How many seconds till the Survivor is killed after being incapacitated (Def 25)
// -
// Default: "25"
// Minimum: "0.000000"
l4d_survivorrespawn_incapdelay "25"

// Survivors will be killed when incapped and respawn afterwards (Def 1)
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_survivorrespawn_incapped "1"

// Enables the respawn limit for Survivors (Def 1)
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_survivorrespawn_limitenable "1"

// Amount of buffer HP a Survivor will respawn with (Def 30)
// -
// Default: "30"
// Minimum: "0.000000"
l4d_survivorrespawn_respawnbuffhp "30"

// Amount of HP a Survivor will respawn with (Def 70)
// -
// Default: "70"
// Minimum: "0.000000"
l4d_survivorrespawn_respawnhp "70"

// How many seconds till the Survivor respawns (Def 10)
// -
// Default: "10"
// Minimum: "0.000000"
l4d_survivorrespawn_respawntimeout "10"

// Save player statistics if is have died.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_survivorrespawn_savestats "1"

// Which is first slot weapon will be given to the Survivor (1 - Autoshotgun, 2 - M16, 3 - Hunting Rifle, 4 - None)
// -
// Default: "1"
// Minimum: "1.000000"
// Maximum: "4.000000"
l4d_survivorrespawn_firstweapon "1"

// Which is second slot weapon will be given to the Survivor (1 - Dual Pistol, 4 - None)
// -
// Default: "1"
// Minimum: "1.000000"
// Maximum: "4.000000"
l4d_survivorrespawn_secondweapon "1"

// Which is thrown weapon will be given to the Survivor (1 - Moltov, 2 - Pipe Bomb, 4 - None)
// -
// Default: "1"
// Minimum: "1.000000"
// Maximum: "4.000000"
l4d_survivorrespawn_thrownweapon "1"

// Which prime health unit will be given to the Survivor (1 - Medkit, 3 - None)
// -
// Default: "1"
// Minimum: "1.000000"
// Maximum: "3.000000"
l4d_survivorrespawn_primehealth "1"

// Which secondary health unit will be given to the Survivor (1 - Pills, 3 - None)
// -
// Default: "1"
// Minimum: "1.000000"
// Maximum: "3.000000"
l4d_survivorrespawn_secondaryhealth "1" 

Changelog

HTML Code:

2.0 - [03/11/2020] Public version (previous unregistered versions).

2.1 - [04/11/2020] Added client checker in removal of visible bodies.
      [04/12/2020] Added language support for Hungarian and Russian
      [05/08/2020] Added language support for Chinese and Simplified Chinese

      (No further changes)


Installation

1 - Click "Get Plugin" and put the "Survivor Respawn.smx" file into your server or game \addons\sourcemod\plugins\ folder.
2 - Click Get "SurvivorRespawn.phrases.txt" file and put in \addons\sourcemod\translations
3 - Click Get "SurvivorRespawn.txt" file and put in \addons\sourcemod\gamedata

ur5efj 04-11-2020 12:04

Re: [L4D1 AND L4D2] Survivor Respawn
 
SM 1.10.0.6478
Code:

L 04/11/2020 - 18:14:07: SourceMod error session started
L 04/11/2020 - 18:14:07: Info (map "c10m1_caves") (file "C:\SteamCMD\SteamApps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\logs\errors_20200411.log")
L 04/11/2020 - 18:14:07: [SM] Exception reported: Client index 0 is invalid
L 04/11/2020 - 18:14:07: [SM] Blaming: SurvivorRespawn.smx
L 04/11/2020 - 18:14:07: [SM] Call stack trace:
L 04/11/2020 - 18:14:07: [SM]  [0] IsFakeClient
L 04/11/2020 - 18:14:07: [SM]  [1] Line 508, SurvivorRespawn.sp::Event_DeadSurvivorVisible
L 04/11/2020 - 18:19:16: Error log file session closed.


KRUTIK 04-12-2020 04:52

Re: [L4D1 AND L4D2] Survivor Respawn
 
1 Attachment(s)
Added a Russian translation.

KasperH 04-12-2020 06:25

Re: [L4D1 AND L4D2] Survivor Respawn
 
1 Attachment(s)
Added Hungarian. :)

HarryPotter 04-21-2020 08:13

Re: [L4D1 AND L4D2] Survivor Respawn
 
1 Attachment(s)
Add traditional Chinese and Simplified Chinese

HarryPotter 07-18-2020 11:44

Re: [L4D1 AND L4D2] Survivor Respawn
 
I found a bug when playing l4d2 5+ players !!
It removes the player's body when dead,
player can't use defibrillator to save player's body that has disappeared automatically.

People can use Defib_Fix[Left 4 Fix] instead to prevent bugs with the defibrillator.
I remove the following code and no bugs happen anymore.
PHP Code:

if ( bL4D2 )
    
HookEvent("dead_survivor_visible"Event_DeadSurvivorVisible);


public 
void Event_DeadSurvivorVisibleEvent hEvent, const char[] sNamebool bDontBroadcast )
{    
    
int DeadBody hEvent.GetInt"subject" );
    
int DeadPlayer GetClientOfUserIdhEvent.GetInt"deadplayer" ) );
    
    if ( !
DeadPlayer || !DeadBody 
        return;
    
    if ( 
IsFakeClientDeadPlayer ) )                 return;
    else if ( 
GetClientTeamDeadPlayer ) != )     return;
    else if ( 
IsPlayerAliveDeadPlayer ) )         AcceptEntityInputDeadBody"Kill" );
    
//    PrintToChatAll( "\x03%N\x01's body has been removed", DeadPlayer ); // Test.
//    PrintToChatAll( "\x03%i \x01Client Index", DeadBody ); // Test.



Lider99 10-23-2020 21:08

Re: [L4D1 AND L4D2] Survivor Respawn
 
Good job :D

moekai 10-30-2020 18:48

Re: [L4D1 AND L4D2] Survivor Respawn
 
Can you add an option to use the command on dead bots?

Marttt 11-18-2020 22:42

Re: [L4D1 AND L4D2] Survivor Respawn
 
4 Attachment(s)
I'm having the same error reported by HarryPotter.

Reporting this one:
Code:

[SM] Blaming: Survivor Respawn.smx
[SM] Call stack trace:
[SM]  [0] GetEntProp
[SM]  [1] Line 928, /home/forums/content/files/2/9/0/3/2/7/185091.attach::IsClientIdle
[SM]  [2] Line 646, /home/forums/content/files/2/9/0/3/2/7/185091.attach::TimerCount

I added a HasEntProp(i, Prop_Send, "m_humanSpectatorUserID") check to prevent this.

Also the plugin needs do hook convar changes, if I change a convar in midgame it doesn't apply cause the plugin reads the cvar only once (3 seconds after PluginStart).

I changed it to always read from ConVar as a quick fix.

Added pt-br and pt-pt translations.

VladimirTk 10-21-2021 23:08

Re: [L4D1 AND L4D2] Survivor Respawn
 
1 Attachment(s)
Updated Game Data Signatures
If someone could review and affirm the initial compensations, Thank you very much :D

Signature credits updated to Psykotik for signatures :D


All times are GMT -4. The time now is 09:15.

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