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 12-27-2021 , 05:18   Re: [L4D & L4D2] Left 4 DHooks Direct (1.83) [25-Dec-2021]
Reply With Quote #561

Which version left4dhooks? Maybe fixed in newer ones, try updating. Otherwise that plugin needs fixing.
__________________
Silvers is offline
yzybb
Member
Join Date: Jul 2020
Old 12-28-2021 , 02:34   Re: [L4D & L4D2] Left 4 DHooks Direct (1.83) [25-Dec-2021]
Reply With Quote #562

Hello Silvers, excuse me, Which function can directly get the player who is in the rushers? (Most leading a player)
According to my query, can this function be used to achieve it? (L4D2_GetVersusCompletionPlayer(int client);)
Use this function to traverse all players, and then take the highest value. Is the result the player who runs in the front?
When someone arrives at the end of the safe house, will this value be 100?

Last edited by yzybb; 12-28-2021 at 02:45.
yzybb is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 12-28-2021 , 03:37   Re: [L4D & L4D2] Left 4 DHooks Direct (1.83) [25-Dec-2021]
Reply With Quote #563

Quote:
Originally Posted by yzybb View Post
Hello Silvers, excuse me, Which function can directly get the player who is in the rushers? (Most leading a player)
According to my query, can this function be used to achieve it? (L4D2_GetVersusCompletionPlayer(int client);)
Use this function to traverse all players, and then take the highest value. Is the result the player who runs in the front?
When someone arrives at the end of the safe house, will this value be 100?
You can use L4D_GetHighestFlowSurvivor. Also suggest looking at [L4D & L4D2] Anti Rush plugin. Yes should be 100.
__________________
Silvers is offline
yzybb
Member
Join Date: Jul 2020
Old 12-28-2021 , 03:53   Re: [L4D & L4D2] Left 4 DHooks Direct (1.83) [25-Dec-2021]
Reply With Quote #564

Quote:
Originally Posted by Silvers View Post
You can use L4D_GetHighestFlowSurvivor. Also suggest looking at [L4D & L4D2] Anti Rush plugin. Yes should be 100.
I'm sorry, Silvers, I have read this plugin carefully, it is too esoteric for me, and some parts I can't understand at all. So I check your api and hope there is a direct way to get Most leading a player.
According to your explanation, L4D_GetHighestFlowSurvivor is really good, but I also need to judge whether someone has entered the terminal safe house. If someone has entered the terminal safe house, then I will need to get the person who is the most backward, so is L4D_GetHighestFlowSurvivor more than L4D2_GetVersusCompletionPlayer Suitable?

I don’t quite understand this yet, I hope you can give some guidance, thanks.

Last edited by yzybb; 12-28-2021 at 04:22.
yzybb is offline
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 12-28-2021 , 04:21   Re: [L4D & L4D2] Left 4 DHooks Direct (1.83) [25-Dec-2021]
Reply With Quote #565

Quote:
Originally Posted by yzybb View Post
but I also need to judge whether someone has entered the terminal safe house.
PHP Code:
// Returns true when the specified Survivor or Special Infected is in the ending checkpoint area.
native bool L4D_IsInLastCheckpoint(int client); 
Quote:
then I will need to get the person who is the most backward,
Use L4D2_GetVersusCompletionPlayer() function to traverse all players, and then take the lowest value.
__________________
HarryPotter is offline
yzybb
Member
Join Date: Jul 2020
Old 12-28-2021 , 04:24   Re: [L4D & L4D2] Left 4 DHooks Direct (1.83) [25-Dec-2021]
Reply With Quote #566

Quote:
Originally Posted by HarryPotter View Post
PHP Code:
// Returns true when the specified Survivor or Special Infected is in the ending checkpoint area.
native bool L4D_IsInLastCheckpoint(int client); 


Use L4D2_GetVersusCompletionPlayer() function to traverse all players, and then take the lowest value.
Thanks!!!!! I'll try it!
yzybb is offline
yzybb
Member
Join Date: Jul 2020
Old 01-02-2022 , 06:24   Re: [L4D & L4D2] Left 4 DHooks Direct (1.83) [25-Dec-2021]
Reply With Quote #567

Quote:
Originally Posted by Silvers View Post
You can use L4D_GetHighestFlowSurvivor. Also suggest looking at [L4D & L4D2] Anti Rush plugin. Yes should be 100.
L 01/02/2022 - 18:49:47: SourceMod error session started
L 01/02/2022 - 18:49:47: Info (map "beginninghours_m1_shipbtc") (file "E:\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\logs\error s_20220102.log")
L 01/02/2022 - 18:49:47: [SM] Exception reported: Array index out-of-bounds (index -1, limit 66)
L 01/02/2022 - 18:49:47: [SM] Blaming: left4dhooks.smx
L 01/02/2022 - 18:49:47: [SM] Call stack trace:
L 01/02/2022 - 18:49:47: [SM] [1] Line 4232, C:\Servers\L4D2\left4dead2\addons\sourcemod\s cripting\left4dhooks.sp::InCheckpoint
L 01/02/2022 - 18:49:47: [SM] [2] Line 4227, C:\Servers\L4D2\left4dead2\addons\sourcemod\s cripting\left4dhooks.sp::Native_IsInLastCheck point
L 01/02/2022 - 18:49:47: [SM] [4] L4D_IsInLastCheckpoint
L 01/02/2022 - 18:49:47: [SM] [5] Line 1131, E:\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting\ l4d2_autoIS_extend_cn.sp::SpawnInfectedAuto
L 01/02/2022 - 18:49:51: [SM] Exception reported: Array index out-of-bounds (index -1, limit 66)
L 01/02/2022 - 18:49:51: [SM] Blaming: left4dhooks.smx
L 01/02/2022 - 18:49:51: [SM] Call stack trace:
L 01/02/2022 - 18:49:51: [SM] [1] Line 4232, C:\Servers\L4D2\left4dead2\addons\sourcemod\s cripting\left4dhooks.sp::InCheckpoint
L 01/02/2022 - 18:49:51: [SM] [2] Line 4227, C:\Servers\L4D2\left4dead2\addons\sourcemod\s cripting\left4dhooks.sp::Native_IsInLastCheck point
L 01/02/2022 - 18:49:51: [SM] [4] L4D_IsInLastCheckpoint
L 01/02/2022 - 18:49:51: [SM] [5] Line 1131, E:\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting\ l4d2_autoIS_extend_cn.sp::SpawnInfectedAuto
L 01/02/2022 - 18:58:16: Error log file session closed.
yzybb is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 01-02-2022 , 06:36   Re: [L4D & L4D2] Left 4 DHooks Direct (1.83) [25-Dec-2021]
Reply With Quote #568

Which version Left4DHooks are you using? This looks like a problem with "l4d2_autoIS_extend_cn.sp" "SpawnInfectedAuto" not left4dhooks. They should be validating the client index, not me. That plugin is putting through an invalid client "-1" without checking it first.
__________________

Last edited by Silvers; 01-02-2022 at 06:38.
Silvers is offline
yzybb
Member
Join Date: Jul 2020
Old 01-02-2022 , 06:47   Re: [L4D & L4D2] Left 4 DHooks Direct (1.83) [25-Dec-2021]
Reply With Quote #569

Quote:
Originally Posted by Silvers View Post
Which version Left4DHooks are you using? This looks like a problem with "l4d2_autoIS_extend_cn.sp" "SpawnInfectedAuto" not left4dhooks. They should be validating the client index, not me. That plugin is putting through an invalid client "-1" without checking it first.
VERSION "1.52"

Code:
new client = L4D_GetHighestFlowSurvivor();
if(L4D_IsInLastCheckpoint(client))
{
	client = GetAnyClient();
}
Based on the value of your API.

Last edited by yzybb; 01-02-2022 at 06:48.
yzybb is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 01-02-2022 , 08:28   Re: [L4D & L4D2] Left 4 DHooks Direct (1.83) [25-Dec-2021]
Reply With Quote #570

I think you should add a check in the plugin to validate the player so the rest of the code works as expected and doesn't use an invalid index. I don't think this is something that should be done in left4dhooks. I'll add a note to the include that "L4D_GetHighestFlowSurvivor" can return -1 if no valid client is found.

Also, why are you using such an old version of left4dhooks?
__________________

Last edited by Silvers; 01-02-2022 at 08:29.
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 14:48.


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