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

[L4D & L4D2] Left 4 DHooks Direct (1.146) [21-Apr-2024]


Post New Thread Reply   
 
Thread Tools Display Modes
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 07-10-2020 , 19:12   Re: [L4D & L4D2] Left 4 DHooks Direct (1.16a) [16-Jun-2020]
Reply With Quote #131

Quote:
Originally Posted by BHaType View Post
@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
Thanks, added this and tested Win/Nix both working without crash. This is L4D2 only as I cannot find an equivalent for L4D1 Windows, the only available functions appear to use an entity to get the position from, even the NavArea functions. So will release (soon) without L4D1 support.
__________________
Silvers is offline
Alex101192
Senior Member
Join Date: Aug 2018
Old 07-12-2020 , 10:37   Re: [L4D & L4D2] Left 4 DHooks Direct (1.16a) [16-Jun-2020]
Reply With Quote #132

Quote:
Originally Posted by XDglory View Post
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.
Just tried and it's working. Thank you.

EDIT: After going to next map, nothing happened when quitting saferoom. The message saying game on didn't show up in chat, and friendly fire remained disabled for the entire game.

Last edited by Alex101192; 07-12-2020 at 11:51. Reason: Not working after going to next level saferrom
Alex101192 is offline
XDglory
Member
Join Date: May 2012
Old 07-13-2020 , 10:45   Re: [L4D & L4D2] Left 4 DHooks Direct (1.16a) [16-Jun-2020]
Reply With Quote #133

Quote:
Originally Posted by Alex101192 View Post
Just tried and it's working. Thank you.

EDIT: After going to next map, nothing happened when quitting saferoom. The message saying game on didn't show up in chat, and friendly fire remained disabled for the entire game.
That's weird... It should have been fixed.
I hooked more events that are relative round end, might solve the problem.

//---------------------------------------------------//

And, what am I supposed to use forward "L4D2_OnStagger" ? I've tried shoot boomer to stagger other SI, and shoot propane tank near SI to stagger it, but this forward seemed not called.

Code:
public Action:L4D2_OnStagger(target, source){
	
	PrintToChatAll("%N is staggered.", target);
		
	//Some functions
	
	return Plugin_Continue;
}
Meanwhile, "L4D_OnShovedBySurvivor" is functional, but the parameter "client" and "victim" seems opposite xD
Code:
public Action:L4D_OnShovedBySurvivor(client, victim, const Float:vecDir[3]) {
	PrintToChatAll("%N shoved %N.", client, victim);
	// OutPut: Jockey shoved Coach.
}
Attached Files
File Type: sp Get Plugin or Get Source (l4d2_nota.sp - 172 views - 4.5 KB)

Last edited by XDglory; 07-13-2020 at 12:43. Reason: L4D2_OnStagger worked somehow o.0
XDglory is offline
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 07-13-2020 , 13:18   Re: [L4D & L4D2] Left 4 DHooks Direct (1.16a) [16-Jun-2020]
Reply With Quote #134

L4D2_OnStagger is called when someone is in the process of stumbling.
cravenge is offline
yuzumi
Member
Join Date: Jul 2020
Old 07-20-2020 , 01:26   Re: [L4D & L4D2] Left 4 DHooks Direct (1.16a) [16-Jun-2020]
Reply With Quote #135

I using this plugin : [L4D2] Boss Spawn

In SourceMod 1.11-build 6599 + MetaMod 1.11-build 1131 + dhooks 2.2.0-detours14a + L4Dooks 1.16a + Ubuntu 18.04 LTS

This Plugin An error
Quote:
L 07/20/2020 - 08:52:07: [SM] Exception reported: ThisPtr address cannot be null
L 07/20/2020 - 08:52:07: [SM] Blaming: compiled/left4dhooks.smx
L 07/20/2020 - 08:52:07: [SM] Call stack trace:
L 07/20/2020 - 08:52:07: [SM] [0] SDKCall
L 07/20/2020 - 08:52:07: [SM] [1] Line 5036, left4dhooks.sp::Native_GetHighestFlowSurvivor
L 07/20/2020 - 08:52:07: [SM] [3] L4D_GetHighestFlowSurvivor
L 07/20/2020 - 08:52:07: [SM] [4] Line 248, l4d2_boss_spawn.sp::TimerCheckFlow
But this plugin work in SourceMod 1.10 and no error,use the same plugins and exts.
yuzumi is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 07-20-2020 , 05:51   Re: [L4D & L4D2] Left 4 DHooks Direct (1.16a) [16-Jun-2020]
Reply With Quote #136

Thanks can I PM you a test version to see if that fixes?
__________________
Silvers is offline
yuzumi
Member
Join Date: Jul 2020
Old 07-20-2020 , 07:14   Re: [L4D & L4D2] Left 4 DHooks Direct (1.16a) [16-Jun-2020]
Reply With Quote #137

Quote:
Originally Posted by Silvers View Post
Thanks can I PM you a test version to see if that fixes?
yes,of course
yuzumi is offline
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 07-24-2020 , 07:19   Re: [L4D & L4D2] Left 4 DHooks Direct (1.17) [20-Jul-2020]
Reply With Quote #138

I found a small bug in l4d1 when using
PHP Code:
// Replaces a players tank control with another player
native void L4D_ReplaceTank(int tankint newtank); 
if new player is in position A and old tank player is in position B,
after I call this function,
new player takes over the tank from old tank player,
but this new player's position is still in A.

For example, I am ghost infected, and near by the survivors,
when I replace tank control with another player, I am just near by the survivors !!
So I have to make a little fix here
PHP Code:
void _L4D_ReplaceTank(int tankint newtank)
{
    
float Origin[3], Angles[3];
    
GetClientAbsOrigin(tankOrigin);
    
GetClientAbsAngles(tankAngles);

    
L4D_ReplaceTank(tank,newtank);

    
TeleportEntity(newtankOriginAnglesNULL_VECTOR); //fix position

edited: same problem in l4d2
__________________

Last edited by HarryPotter; 07-24-2020 at 08:02.
HarryPotter is offline
Beatles
Senior Member
Join Date: Feb 2014
Old 08-07-2020 , 00:56   Re: [L4D & L4D2] Left 4 DHooks Direct (1.17) [20-Jul-2020]
Reply With Quote #139

With this extension do you think it is possible to remove the glow from the survivors in L4D1? in order to do a realistic way for example.
Beatles is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 08-08-2020 , 10:00   Re: [L4D & L4D2] Left 4 DHooks Direct (1.17) [20-Jul-2020]
Reply With Quote #140

Quote:
Originally Posted by fbef0102 View Post
I found a small bug in l4d1 when using
Look at the "Native_ReplaceTank" code. It's teleporting the old/new tank to where they were originally otherwise they ended up at 0,0,0 or something in the wrong place. It's not a bug, it's intentionally set like this. Maybe the old/new should be swapped around but I didn't give it much more thought than just writing it like this. After calling "L4D_ReplaceTank" you're free to teleport them to where you like. Maybe I'll change eventually so the coords are swapped but others might want to be setting different coords anyway.


Quote:
Originally Posted by Beatles View Post
With this extension do you think it is possible to remove the glow from the survivors in L4D1? in order to do a realistic way for example.
I doubt it.
__________________
Silvers 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 00:17.


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