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
Mystik Spiral
Senior Member
Join Date: Oct 2020
Location: Orlando, FL
Old 07-26-2023 , 07:33   Re: [L4D & L4D2] Left 4 DHooks Direct (1.134) [10-Jul-2023]
Reply With Quote #951

Quote:
Originally Posted by Silvers View Post
You should look at the test plugin for examples on the forwards/natives etc, it already demonstrates and explains all of this.
Okay, that was embarrassing. The test plugin (left4dhooks_test.sp) cleared things up. Thank you for your patience and help!
Mystik Spiral is offline
Mystik Spiral
Senior Member
Join Date: Oct 2020
Location: Orlando, FL
Old 07-26-2023 , 09:11   Re: [L4D & L4D2] Left 4 DHooks Direct (1.134) [10-Jul-2023]
Reply With Quote #952

@Silvers

I noticed that when a client is healing themselves, FindUseEntity returns -1. I am not sure whether FindUseEntity should return target = client or whether plugins should include a case where type == L4D2WeaponId_FirstAidKit that sets target = client, like:

Code:
if( type == L4D2WeaponId_FirstAidKit && target < 0) target = client;
The test plugin does not have this check and returns target = 0 when a client is healing themselves.

Update:
If there is no player in your view and you Mouse1-click to heal self, the test plugin will return 0 (because FindUseEntity is returning -1).
If you are looking at another player and Mouse1-click to heal self, the test plugin will return the id of the player you are looking at.
The test plugin does not account for whether you are Mouse1-clicking to heal self or Mouse2-clicking to heal another player.
I fixed this in my own code by checking whether Mouse1 (IN_ATTACK) was being pressed. Just passing this along in case you want to update the test plugin.

Last edited by Mystik Spiral; 07-26-2023 at 22:19.
Mystik Spiral is offline
KadabraZz
Senior Member
Join Date: May 2020
Old 07-31-2023 , 08:33   Re: [L4D & L4D2] Left 4 DHooks Direct (1.16) [05-Jun-2020]
Reply With Quote #953

Quote:
Originally Posted by Silvers View Post
Finally supporting [L4D(2)] Remove Lobby Reservation (When Full). Download latest version below.

You can thank "SilentBr" for pushing me to do it.

Code:
1.16 (05-Jun-2020)
    - Added native "L4D_LobbyUnreserve" finally, to support "Remove Lobby Reservation (When Full)" plugin.
    - Huge thanks to "GAMMACASE" and "Deathreus" for helping figure why the native was crashing.

    - Updated: L4D1 GameData file.
    - Updated: Plugin and Include file.

Attached is version 1.2 of "Remove Lobby Reservation" compiled against left4dhooks and updated syntax.
Code:
1.2 (05-Jun-2020)
    - Converted to the latest syntax.
    - Compiled using left4dhooks include file.
Could someone explain to me exactly how to set this up? Excuse my ignorance but this would be for the lobby reservation to work up to 4 players coop / 8 versus and automatically deactivate once it reaches the limit so that people can still connect using the ip after that?

Because I leave the reservation activated and let the plugin work to deactivate it, people can't connect even with the reservation deactivated after that. If someone can explain to me =)
KadabraZz is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 08-05-2023 , 07:30   Re: [L4D & L4D2] Left 4 DHooks Direct (1.134) [10-Jul-2023]
Reply With Quote #954

Please, fix:

Code:
stock bool L4D2_SetEntityGlow(int entity, L4D2GlowType type, int range, int minRange, colorOverride[3], bool flashing)
missing "int" type of colorOverride argument.

Also, may be make sense to declare
Code:
#pragma newdecls required
per-include, based on: pragmas are now file-scoped
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

Last edited by Dragokas; 08-05-2023 at 08:38.
Dragokas is offline
Tank Rush
Senior Member
Join Date: May 2019
Location: Argentina
Old 08-08-2023 , 00:34   Re: [L4D & L4D2] Left 4 DHooks Direct (1.134) [10-Jul-2023]
Reply With Quote #955

I have these errors in logs
Code:
L 08/08/2023 - 01:15:32: SourceMod error session started
L 08/08/2023 - 01:15:32: Info (map "c2m3_coaster") (file "D:\Program Files\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\logs\errors_20230808.log")
L 08/08/2023 - 01:15:32: [SM] Exception reported: Error in addons\sourcemod\configs\banreasons.txt: File not found, corrupt or in the wrong format
L 08/08/2023 - 01:15:32: [SM] Blaming: basebans.smx
L 08/08/2023 - 01:15:32: [SM] Call stack trace:
L 08/08/2023 - 01:15:32: [SM]   [0] SetFailState
L 08/08/2023 - 01:15:32: [SM]   [1] Line 128, D:\builds\build-sourcemod-msvc12\windows-1.12\build\plugins\basebans.sp::LoadBanReasons
L 08/08/2023 - 01:15:32: [SM]   [2] Line 71, D:\builds\build-sourcemod-msvc12\windows-1.12\build\plugins\basebans.sp::OnPluginStart
L 08/08/2023 - 01:15:32: [SM] Unable to load plugin "basebans.smx": Error detected in plugin startup (see error logs)
L 08/08/2023 - 01:15:32: [SM] Unable to load plugin "left4dhooks.smx": Native "DHookParam.GetAddress" was not found
L 08/08/2023 - 01:15:34: [admin-flatfile.smx] Error(s) detected parsing addons\sourcemod\configs\admins.cfg
L 08/08/2023 - 01:15:34: [admin-flatfile.smx]  (line 42) Failed to create admin: did you forget either the auth or identity properties?
L 08/08/2023 - 01:15:34: [admin-flatfile.smx]  (line 48) Failed to create admin: did you forget either the auth or identity properties?
L 08/08/2023 - 01:15:34: [admin-flatfile.smx]  (line 54) Failed to create admin: did you forget either the auth or identity properties?
L 08/08/2023 - 01:15:34: [admin-flatfile.smx]  (line 60) Failed to create admin: did you forget either the auth or identity properties?
L 08/08/2023 - 01:15:34: [admin-flatfile.smx]  (line 66) Failed to create admin: did you forget either the auth or identity properties?
L 08/08/2023 - 01:15:34: [admin-flatfile.smx]  (line 72) Failed to create admin: did you forget either the auth or identity properties?
L 08/08/2023 - 01:20:07: Error log file session closed.
I am using SourceMod v1.12.0.7037 and Metamod v1.12.0.1167 because of the Mutant Tanks plugin v8.97 requires SourceMod 1.12.0.6985 or higher.
I would also like to know why basebans.smx and admin-flatfile.smx are giving me errors
__________________
Sorry i don't speak english very well

--->My name is Source and I'm on Steam<---
Discord: Source#9382
Tank Rush is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 08-18-2023 , 16:03   Re: [L4D & L4D2] Left 4 DHooks Direct (1.135) [18-Aug-2023]
Reply With Quote #956

Quote:
Originally Posted by Tank Rush View Post
I have these errors in logs
Code:
L 08/08/2023 - 01:15:32: SourceMod error session started
L 08/08/2023 - 01:15:32: Info (map "c2m3_coaster") (file "D:\Program Files\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\logs\errors_20230808.log")
L 08/08/2023 - 01:15:32: [SM] Exception reported: Error in addons\sourcemod\configs\banreasons.txt: File not found, corrupt or in the wrong format
L 08/08/2023 - 01:15:32: [SM] Blaming: basebans.smx
L 08/08/2023 - 01:15:32: [SM] Call stack trace:
L 08/08/2023 - 01:15:32: [SM]   [0] SetFailState
L 08/08/2023 - 01:15:32: [SM]   [1] Line 128, D:\builds\build-sourcemod-msvc12\windows-1.12\build\plugins\basebans.sp::LoadBanReasons
L 08/08/2023 - 01:15:32: [SM]   [2] Line 71, D:\builds\build-sourcemod-msvc12\windows-1.12\build\plugins\basebans.sp::OnPluginStart
L 08/08/2023 - 01:15:32: [SM] Unable to load plugin "basebans.smx": Error detected in plugin startup (see error logs)
L 08/08/2023 - 01:15:32: [SM] Unable to load plugin "left4dhooks.smx": Native "DHookParam.GetAddress" was not found
L 08/08/2023 - 01:15:34: [admin-flatfile.smx] Error(s) detected parsing addons\sourcemod\configs\admins.cfg
L 08/08/2023 - 01:15:34: [admin-flatfile.smx]  (line 42) Failed to create admin: did you forget either the auth or identity properties?
L 08/08/2023 - 01:15:34: [admin-flatfile.smx]  (line 48) Failed to create admin: did you forget either the auth or identity properties?
L 08/08/2023 - 01:15:34: [admin-flatfile.smx]  (line 54) Failed to create admin: did you forget either the auth or identity properties?
L 08/08/2023 - 01:15:34: [admin-flatfile.smx]  (line 60) Failed to create admin: did you forget either the auth or identity properties?
L 08/08/2023 - 01:15:34: [admin-flatfile.smx]  (line 66) Failed to create admin: did you forget either the auth or identity properties?
L 08/08/2023 - 01:15:34: [admin-flatfile.smx]  (line 72) Failed to create admin: did you forget either the auth or identity properties?
L 08/08/2023 - 01:20:07: Error log file session closed.
I am using SourceMod v1.12.0.7037 and Metamod v1.12.0.1167 because of the Mutant Tanks plugin v8.97 requires SourceMod 1.12.0.6985 or higher.
I would also like to know why basebans.smx and admin-flatfile.smx are giving me errors
This is the wrong place to ask for unrelated errors. Read the error messages, it gives you an idea something is wrong.

As for "DHookParam.GetAddress" was not found error, it seems like you didn't update the sourcemod extensions with what's in the SM 1.12 package. Maybe same issue with banreasons and admin-flatfile, sounds like something missing and/or formatted wrong. If you use the old version of Helms Deep that was full of malicious stuff that also caused the same banreasons error, but that was removed from the workshop so I don't think that's the issue.




Code:
1.135 (18-Aug-2023)
    - Added a ton of natives for "PlayerAnimState" in L4D2 only. See the "methodmap PlayerAnimState" section of the "left4dhooks.inc" include file. Thanks to "Forgetest" for the code and "A1m`" for various stuff.
    - Added native "L4D_HasMapStarted" to check if game addresses have been loaded in OnMapStart. For use with some natives that require being called only after OnMapStart.
    - Added an example to the test plugin for use with "L4D_HasMapStarted" and natives that require waiting after OnMapStart. See the first OnMapStart section that is commented out.
    - Fixed forward "L4D2_OnPounceOrLeapStumble" detour to potentially fix rare random crashes. Thanks to "A1m`" and "Forgetest" for reporting.
    - Fixed stock "L4D2_SetEntityGlow" to use the newdecls. Thanks to "Dragokas" for reporting.
    - Fixed the test plugin examples for "L4D1_FirstAidKit_StartHealing" and "L4D2_BackpackItem_StartAction". Thanks to "Mystik Spiral" for reporting.

    - Updated: Plugin and test plugin.
    - Updated: "/scripting/gamedata/left4dhooks.l4d2.txt" GameData file.
    - Updated: "/scripting/include/left4dhooks.inc" Include file.
    - Updated: "/scripting/include/left4dhooks_stocks.inc" Include file.
    - Updated: "/scripting/l4dd/l4dd_forwards.sp" project file.
    - Updated: "/scripting/l4dd/l4dd_gamedata.sp" project file.
    - Updated: "/scripting/l4dd/l4dd_natives.sp" project file.
    - Updated: "/scripting/l4dd/l4dd_setup.sp" project file.
__________________

Last edited by Silvers; 08-18-2023 at 16:06.
Silvers is offline
extrav3rt
AlliedModders Donor
Join Date: Jul 2014
Old 08-29-2023 , 13:39   Re: [L4D & L4D2] Left 4 DHooks Direct (1.135) [18-Aug-2023]
Reply With Quote #957

Hello, there is some bug. When killing a hunter (a real player, not AI), who sits on a survivor, 2 kills are counted. Can you please check it? SDKHook_OnTakeDamage

Last edited by extrav3rt; 08-29-2023 at 13:56.
extrav3rt is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 08-29-2023 , 19:12   Re: [L4D & L4D2] Left 4 DHooks Direct (1.135) [18-Aug-2023]
Reply With Quote #958

Not sure how common this request will be.

There isn't an event that indicates when a common infected is biled.

This is probably the relevant signature.

Do you want to add it?

@_ZN8Infected15OnHitByVomitJarEP20CBaseCombat Character

Infected::OnHitByVomitJar
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
Jasonex
Junior Member
Join Date: Aug 2023
Old 08-31-2023 , 11:16   Re: [L4D & L4D2] Left 4 DHooks Direct (1.135) [18-Aug-2023]
Reply With Quote #959

L 08/31/2023 - 23:14:22: [SM] Failed to load plugin "[L4D2] Left4dhooks.smx":
====================
This plugin replaces Left4Downtown. Delete the extension to run.

The Plugin works. There is also Cfg. But here is the error that appears
Jasonex is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 08-31-2023 , 11:32   Re: [L4D & L4D2] Left 4 DHooks Direct (1.135) [18-Aug-2023]
Reply With Quote #960

Quote:
Originally Posted by Jasonex View Post
L 08/31/2023 - 23:14:22: [SM] Failed to load plugin "[L4D2] Left4dhooks.smx":
====================
This plugin replaces Left4Downtown. Delete the extension to run.

The Plugin works. There is also Cfg. But here is the error that appears
Then delete Left4downtown from l4d2/addons/sourcemod/extensions
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 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 12:59.


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