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

[L4D & L4D2] Left 4 DHooks Direct (1.150) [06-May-2024]


Post New Thread Reply   
 
Thread Tools Display Modes
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 02-10-2022 , 14:25   Re: [L4D & L4D2] Left 4 DHooks Direct (1.87) [06-Feb-2022]
Reply With Quote #611

Quote:
Originally Posted by eyal282 View Post
Can you allow devs to figure out whether or not a player is in fling state? A lot of plugins will use, my karma system included.
You can hook players animation and check the ACT_* sequence (1 value for all Survivors) or check the "m_nSequence" (different value for each survivor). There's nothing else you can do to check.
__________________
Silvers is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 02-10-2022 , 14:32   Re: [L4D & L4D2] Left 4 DHooks Direct (1.87) [06-Feb-2022]
Reply With Quote #612

Quote:
Originally Posted by Silvers View Post
You can hook players animation and check the ACT_* sequence (1 value for all Survivors) or check the "m_nSequence" (different value for each survivor). There's nothing else you can do to check.
Would be nice if added, also it doesn't work in 1.11:

Code:
StrongerFinaleTanks.sp
C:\Users\eyal2\Desktop\DesktopReal\Compiler\include\left4dhooks_stocks.inc(158) : error 009: invalid array size (negative, zero or out of bounds)
C:\Users\eyal2\Desktop\DesktopReal\Compiler\include\left4dhooks_stocks.inc(167) : error 010: invalid function or declaration
C:\Users\eyal2\Desktop\DesktopReal\Compiler\include\left4dhooks_stocks.inc(1535) : error 009: invalid array size (negative, zero or out of bounds)
C:\Users\eyal2\Desktop\DesktopReal\Compiler\include\left4dhooks_stocks.inc(1594) : error 010: invalid function or declaration
C:\Users\eyal2\Desktop\DesktopReal\Compiler\include\left4dhooks_stocks.inc(1596) : error 009: invalid array size (negative, zero or out of bounds)
C:\Users\eyal2\Desktop\DesktopReal\Compiler\include\left4dhooks_stocks.inc(1631) : error 010: invalid function or declaration
C:\Users\eyal2\Desktop\DesktopReal\Compiler\include\left4dhooks_stocks.inc(1668) : error 010: invalid function or declaration
Done
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 02-10-2022 , 14:48   Re: [L4D & L4D2] Left 4 DHooks Direct (1.87) [06-Feb-2022]
Reply With Quote #613

Quote:
Originally Posted by eyal282 View Post
Would be nice if added, also it doesn't work in 1.11:
There's nothing to add, hook the players animation and check the sequence/ACT_* or manually check the m_nSequence value somewhere.


Which version of 1.11? Get the latest, seems to compile fine for me.
__________________
Silvers is offline
Forgetest
Member
Join Date: Aug 2020
Old 02-14-2022 , 15:17   Re: [L4D & L4D2] Left 4 DHooks Direct (1.87) [06-Feb-2022]
Reply With Quote #614

PHP Code:
CountdownTimer cTimerGod L4D2Direct_GetInvulnerabilityTimer(iVictim); // left4dhooks
if (cTimerGod != CTimer_Null) {
    
CTimer_Invalidate(cTimerGod); //set m_timestamp - 0.0

This action leads to crashes on L4D2 Windows (both SM1.10 and 1.11) whenever server changes level (or hibernates?), until I tried:

PHP Code:
void Stock_CTimer_SetTimestamp(CountdownTimer timerfloat timestamp)
{
    
StoreToAddress(view_as<Address>(timer) + CTIMER_TIMESTAMP_OFFSETview_as<int>(timestamp), NumberType_Int32false); // @param updateMemAccess

I have no idea exactly why this looks to resolve the issue, but actually my server didn't crash for a whole campaign.

According to @vikingo12, the same seems to happen when the following takes into action:

PHP Code:
L4D2Direct_SetShovePenalty(shoverpenalty);
L4D2Direct_SetNextShoveTime(shoverCalcNextShoveTime(penaltymaxPenalty)); 

Last edited by Forgetest; 02-14-2022 at 15:19.
Forgetest is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 02-14-2022 , 16:07   Re: [L4D & L4D2] Left 4 DHooks Direct (1.87) [06-Feb-2022]
Reply With Quote #615

The "false" param is something from 1.11 I guess and would break compatibility with 1.10. Don't know what to do. Check SM version in define and add the false param if 1.11? #if 1.11 blah else blah sort of thing. I guess that would still cause issues if compiled on 1.10 but running on 1.11 server, since 1.11 servers might be using the compiled version I provide which will always be latest stable SM. When 1.11 is stable I'll do that and force servers to upgrade to 1.11.
__________________
Silvers is offline
AMBoollan
New Member
Join Date: Feb 2022
Old 02-15-2022 , 03:45   Re: [L4D & L4D2] Left 4 DHooks Direct (1.87) [06-Feb-2022]
Reply With Quote #616

PHP Code:
L 02/15/2022 16:32:37: [SMException reportedCould not load the "CTerrorGameRules::IsRealismMode" gamedata signature.
L 02/15/2022 16:32:37: [SMBlamingRepairBug\left4dhooks.smx
L 02
/15/2022 16:32:37: [SMCall stack trace:
L 02/15/2022 16:32:37: [SM]   [0SetFailState
L 02
/15/2022 16:32:37: [SM]   [1Line 3731C:\Servers\L4D2\left4dead2\addons\sourcemod\scripting\left4dhooks.sp::LoadGameData
L 02
/15/2022 16:32:37: [SM]   [2Line 1571C:\Servers\L4D2\left4dead2\addons\sourcemod\scripting\left4dhooks.sp::OnPluginStart
L 02
/15/2022 16:32:37: [SMUnable to load plugin "RepairBug\left4dhooks.smx"Error detected in plugin startup (see error logs
How to solve this problem
AMBoollan is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 02-15-2022 , 04:36   Re: [L4D & L4D2] Left 4 DHooks Direct (1.87) [06-Feb-2022]
Reply With Quote #617

Quote:
Originally Posted by AMBoollan View Post
How to solve this problem
Update left4dhooks.
__________________
Silvers is offline
Forgetest
Member
Join Date: Aug 2020
Old 02-15-2022 , 14:01   Re: [L4D & L4D2] Left 4 DHooks Direct (1.87) [06-Feb-2022]
Reply With Quote #618

Quote:
Originally Posted by Forgetest View Post
PHP Code:
CountdownTimer cTimerGod L4D2Direct_GetInvulnerabilityTimer(iVictim); // left4dhooks
if (cTimerGod != CTimer_Null) {
    
CTimer_Invalidate(cTimerGod); //set m_timestamp - 0.0

This action leads to crashes on L4D2 Windows (both SM1.10 and 1.11) whenever server changes level (or hibernates?), until I tried:

PHP Code:
void Stock_CTimer_SetTimestamp(CountdownTimer timerfloat timestamp)
{
    
StoreToAddress(view_as<Address>(timer) + CTIMER_TIMESTAMP_OFFSETview_as<int>(timestamp), NumberType_Int32false); // @param updateMemAccess

I have no idea exactly why this looks to resolve the issue, but actually my server didn't crash for a whole campaign.

According to @vikingo12, the same seems to happen when the following takes into action:

PHP Code:
L4D2Direct_SetShovePenalty(shoverpenalty);
L4D2Direct_SetNextShoveTime(shoverCalcNextShoveTime(penaltymaxPenalty)); 
Would like to add that modifying Invulnerable timer didn't crash the server consistently on level change before I appended a "false" to LoadFromAddress.
While I actually didn't get crashes after that change, I'm not sure that it's indeed a solution, more like a trick. It would be appreciated if someone explains the cause behind.

Crash dumps:
Code:
A6MS-MF53-4WLW
UMLR-BPP4-S4FU
PHRI-YB7Q-J5TL
ADCH-FP32-XCBH
CMZJ-5PHG-K22Q
3HQ6-25CC-OAFL
5VB6-7R5S-HSDI
All these points to exactly the same location, and the first one that I have access to reports EXCEPTION_ACCESS_VIOLATION_WRITE.

https://github.com/alliedmodders/sou..._core.cpp#L751
Forgetest is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 02-15-2022 , 14:08   Re: [L4D & L4D2] Left 4 DHooks Direct (1.87) [06-Feb-2022]
Reply With Quote #619

Can you add @black and @white and @blackwhite

This will indicate a survivor on the third strike, useful for emergency !buy fheal @black
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
WhatsAnName
Member
Join Date: Jun 2018
Old 02-16-2022 , 02:55   Re: [L4D & L4D2] Left 4 DHooks Direct (1.87) [06-Feb-2022]
Reply With Quote #620

trying to use this stock Bool L4D_IsFinaleActive() but im getting errors

PHP Code:
// C:\Program Files (x86)\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting\l4d2_monsterbots(6).sp(1178) : error 139: could not find type "Bool"
// C:\Program Files (x86)\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting\l4d2_monsterbots(6).sp(1178) : error 021: symbol already defined: "L4D_IsFinaleActive" 
but isfinaleactive isnt used elsewhere so idk whats wrong
this is the code trying to execute

PHP Code:
stock Bool L4D_IsFinaleActive()
{
    
timertick 40;

WhatsAnName 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 07:32.


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