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

[L4D & L4D2] Left 4 DHooks Direct (1.144) [05-Mar-2024]


Post New Thread Reply   
 
Thread Tools Display Modes
Mi.Cura
Veteran Member
Join Date: Dec 2016
Location: Brazil
Old 06-26-2020 , 11:55   Re: [L4D & L4D2] Left 4 DHooks Direct (1.16a) [16-Jun-2020]
Reply With Quote #121

Quote:
Originally Posted by Alex101192 View Post
Wrong. This plugin does not work with left 4 DHooks Direct. Tested by me.
I also confirm, this plugin works perfectly on my servers.
__________________
Mi.Cura | Modded Servers | L4D2
https://steamcommunity.com/groups/micuramodzombie
Mi.Cura is offline
Alex101192
Senior Member
Join Date: Aug 2018
Old 06-27-2020 , 02:48   Re: [L4D & L4D2] Left 4 DHooks Direct (1.16a) [16-Jun-2020]
Reply With Quote #122

Interesting.
Alex101192 is offline
Tonblader
Senior Member
Join Date: Jul 2011
Location: Peru
Old 07-01-2020 , 13:37   Re: [L4D & L4D2] Left 4 DHooks Direct (1.16a) [16-Jun-2020]
Reply With Quote #123

Quote:
Originally Posted by Alex101192 View Post
Interesting.
https://forums.alliedmods.net/showpo...2&postcount=62

Additionally, consider this:
Quote:
Originally Posted by Silvers View Post
Other Plugins:
  • All original "left4downtown" plugins should work, they might simply need to be recompiled changing the include "left4downtown" to "left4dhooks".

Last edited by Tonblader; 07-01-2020 at 14:11.
Tonblader is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 07-05-2020 , 13:45   [L4D & L4D2] Special Infected Limit
Reply With Quote #124

About:
  • Uses the z_*_limit cvar values to limit the maximum number of each Special Infected type allowed to be alive.
  • This only limits them, does not increase the maximum allowed. There is another plugin for that (don't have link to hand or remember name).


CVars:

PHP Code:
// ==========
// PLUGIN CVARS:
// ==========
// 1=Bots. 2=Players. 3=Both. Who should be blocked from spawning when the limit is reached.
l4d_special_infected_limit_who "3"

// Special Infected Limit plugin version.
l4d_special_infected_limit_version



// ==========
// GAME CVARS:
// ==========
// L4D1:
z_gas_limit
z_exploding_limit
z_hunter_limit

// L4D2:
z_smoker_limit
z_boomer_limit
z_hunter_limit
z_spitter_limit
z_jockey_limit
z_charger_limit 


Changes:
Code:
1.0 (05-Jul-2020)
    - Initial release.

1.0 (30-Feb-2020)
    - Originally created.


Requirements:

Installation:
DO NOT click 'Get Plugin' or it will fail to compile because this plugin requires DHooks!
  1. Download the .smx file and put into your servers \addons\sourcemod\plugins folder.
Attached Files
File Type: sp Get Plugin or Get Source (l4d_special_infected_limit.sp - 364 views - 4.0 KB)
File Type: smx l4d_special_infected_limit.smx (4.6 KB, 278 views)
__________________

Last edited by Silvers; 06-26-2022 at 12:27.
Silvers is offline
Alex101192
Senior Member
Join Date: Aug 2018
Old 07-06-2020 , 05:52   Re: [L4D & L4D2] Left 4 DHooks Direct (1.16a) [16-Jun-2020]
Reply With Quote #125

Is it possible to make a plugin that disables friendly fire while on starting zone or saferoom maybe using this? The only one I found did this, but when failing the chapter and restarting the no friendly fire would last for all the match.
Alex101192 is offline
XDglory
Member
Join Date: May 2012
Old 07-10-2020 , 09:27   Re: [L4D & L4D2] Left 4 DHooks Direct (1.16a) [16-Jun-2020]
Reply With Quote #126

Quote:
Originally Posted by Alex101192 View Post
Is it possible to make a plugin that disables friendly fire while on starting zone or saferoom maybe using this? The only one I found did this, but when failing the chapter and restarting the no friendly fire would last for all the match.
Not sure if you found the same plugin as I did, but I've modified one written by "R-Hehl". It works like a charm, maybe you can give it a try.

And is it possible to spawn a witch like the way director does with left4dhooks on coop mode? A director-spawned witch is usually on survivors way that we almost need to deal with her, but I've tried "L4D_GetRandomPZSpawnPosition", witch might be spawned on the roof or some areas that survivors can easily avoid.

I noticed a function "L4D_FindRandomSpot(int NavArea, float vecPos[3])", which is described "This is what Witches use to spawn", but I was distressed about finding a reasonable NavArea to input.
Attached Files
File Type: sp Get Plugin or Get Source (l4d2_nota.sp - 259 views - 4.6 KB)

Last edited by XDglory; 07-10-2020 at 11:12.
XDglory is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 07-10-2020 , 10:54   Re: [L4D & L4D2] Left 4 DHooks Direct (1.16a) [16-Jun-2020]
Reply With Quote #127

L4D_GetRandomPZSpawnPosition to get the pos, L4D_GetNearestNavArea or L4D2Direct_GetTerrorNavArea to get the nav area and check its valid otherwise select another pos. There maybe other plugins/extensions to check the NavArea and return the flags for example. I don't know the best solution for finding a random valid position along the flow for survivors.
__________________
Silvers is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 07-10-2020 , 10:55   Re: [L4D & L4D2] Left 4 DHooks Direct (1.16a) [16-Jun-2020]
Reply With Quote #128

Alex you can try to use "L4D_IsAnySurvivorInStartArea".
I usually use this stock above below but after a survivor leaves the saferoom, of course, after it leaves any "blocks" stop working.
Not the same thing you asked but similar.

Spoiler
__________________

Last edited by Marttt; 09-12-2023 at 23:02.
Marttt is offline
XDglory
Member
Join Date: May 2012
Old 07-10-2020 , 12:33   Re: [L4D & L4D2] Left 4 DHooks Direct (1.16a) [16-Jun-2020]
Reply With Quote #129

Quote:
Originally Posted by Silvers View Post
L4D_GetRandomPZSpawnPosition to get the pos, L4D_GetNearestNavArea or L4D2Direct_GetTerrorNavArea to get the nav area and check its valid otherwise select another pos. There maybe other plugins/extensions to check the NavArea and return the flags for example. I don't know the best solution for finding a random valid position along the flow for survivors.
Not sure if I'm doing this right.

Code:
void SpawnWitch(){
	int player = GetSurvivorMaxPercent(true); // retrieve player who holds max flow 
	float pos_player[3], pos_witchSpawnPre[3], pos_witchSpawn[3];
	GetClientAbsOrigin(player, pos_player);

	bool WitchSpawnSuccess = L4D_GetRandomPZSpawnPosition(player, 7, 20, pos_witchSpawnPre);
	
	if (WitchSpawnSuccess){
		L4D_FindRandomSpot(L4D_GetNearestNavArea(pos_witchSpawnPre), pos_witchSpawn);
		L4D2_SpawnWitch(pos_witchSpawn, NULL_VECTOR);
	} else
		PrintToChatAll("Failed to find a spot for witch.");
}
Witch spawned by this function still can be at a place survivor is not reachable, like the roof of the vendor near starting safe room on c2m2.

Last edited by XDglory; 07-10-2020 at 12:34.
XDglory is offline
BHaType
Great Tester of Whatever
Join Date: Jun 2018
Old 07-10-2020 , 13:58   Re: [L4D & L4D2] Left 4 DHooks Direct (1.16a) [16-Jun-2020]
Reply With Quote #130

@Silvers, you can add new native which allow to check reachbility

PHP Code:
"SurvivorBot::IsReachable"
{
            
"linux"        "@_ZNK11SurvivorBot11IsReachableERK6Vector"
            "windows"        "\x55\x8B\xEC\xD9\x05\x2A\x2A\x2A\x2A\x8B\x45\x08"

As i remember it crashes on linux but you can find another function which do the same
__________________
cry

Last edited by BHaType; 07-10-2020 at 14:00.
BHaType is offline
Send a message via AIM to BHaType
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 04:11.


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