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
ReCreator
Member
Join Date: Nov 2017
Location: Ukraine,Kyiv
Old 07-15-2023 , 05:17   Re: [L4D & L4D2] Left 4 DHooks Direct (1.134) [10-Jul-2023]
Reply With Quote #941

Got this error:
Spoiler

It occurs in this line of code:
Spoiler

L4D1, Linux, SM 1.11
__________________
Sorry for my pure English...
ReCreator is offline
sorallll
Senior Member
Join Date: Oct 2018
Old 07-15-2023 , 08:49   Re: [L4D & L4D2] Left 4 DHooks Direct (1.134) [10-Jul-2023]
Reply With Quote #942

Quote:
Originally Posted by ReCreator View Post
Got this error:
Spoiler

It occurs in this line of code:
Spoiler

L4D1, Linux, SM 1.11
PHP Code:
int highest L4D_GetHighestFlowSurvivor();
if(
highest != -&& L4D_GetRandomPZSpawnPosition(highest516spawnpos) == true

Last edited by sorallll; 07-15-2023 at 09:23.
sorallll is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 07-17-2023 , 15:47   Re: [L4D & L4D2] Left 4 DHooks Direct (1.134) [10-Jul-2023]
Reply With Quote #943

Just a note:
In L4D1, when applied to L4D2Direct_DoAnimationEvent, the PlayerAnimEvent_t named animations are almost completely doesn't match to its meaning what we actually see in game when executing this function.
I didn't check L4D2.

My attempt to explain (L4D1):
Quote:
1 - primary attack
2 - unused
3 - aiming
4 - reload reserved ammo
5 - chambering of a cartridge (no sound)
6 - chambering of a cartridge (with sound)
7 - Shotgun reload (with sound)
8 - Shotgun reload (no sound)
9 - Shove (side)
10 - Shove (forward)
11 - Shove (right arm)
12 - Stomp
13 - Heal myself
14 - Heal teammate1
15 - Pick up incapped player
16 - Heal teammate2
21 - headbutt
22 - headbutt2
23 - pick up item from ground
24 - take item from teammate
25 - change weapon
26 - weapon reload fast
27 - weapon recoil + reload
28 - weapon recoil + reload (same)
29... - seems not used (same for 2, 17-20).
Some animation seems applicable only for a specific weapon.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
Krufftys Killers
Senior Member
Join Date: Jan 2014
Old 07-24-2023 , 20:15   Re: [L4D & L4D2] Left 4 DHooks Direct (1.134) [10-Jul-2023]
Reply With Quote #944

Gott his error today
L 07/24/2023 - 065:00: SourceMod error session started
L 07/24/2023 - 065:00: Info (map "c1m1_hotel") (file "d:\tcafiles\users\stevef\63359\left4dead2\ad dons\sourcemod\logs\errors_20230724.log")
L 07/24/2023 - 065:00: [SM] Exception reported:
==========
Native 'L4D2_GetSurvivorSetMap' should not be used before OnMapStart, please report to 3rd party plugin author.
==========
L 07/24/2023 - 065:00: [SM] Blaming: left4dhooks.smx
L 07/24/2023 - 065:00: [SM] Call stack trace:
L 07/24/2023 - 065:00: [SM] [0] ThrowNativeError
L 07/24/2023 - 065:00: [SM] [1] Line 747, l4dd\l4dd_natives.sp::Native_CTerrorGameRules _GetSurvivorSetMap
L 07/24/2023 - 065:00: [SM] [3] L4D2_GetSurvivorSetMap
L 07/24/2023 - 065:00: [SM] [4] Line 55, C:\Users\kruff\Downloads\l4d2_trigger_flow_fi x.sp::OnMapStart
L 07/24/2023 - 06:46:43: SourceMod error session started
L 07/24/2023 - 06:46:43: Info (map "c1m1_hotel") (file "d:\tcafiles\users\stevef\63359\left4dead2\ad dons\sourcemod\logs\errors_20230724.log")
L 07/24/2023 - 06:46:43: [SM] Exception reported:
Krufftys Killers is online now
Mystik Spiral
Senior Member
Join Date: Oct 2020
Location: Orlando, FL
Old 07-24-2023 , 20:24   Re: [L4D & L4D2] Left 4 DHooks Direct (1.134) [10-Jul-2023]
Reply With Quote #945

Hi @Krufftys Killers!

The key part of that is "please report to 3rd party plugin author". In this case:
https://forums.alliedmods.net/showthread.php?p=2786925
Mystik Spiral is offline
Mystik Spiral
Senior Member
Join Date: Oct 2020
Location: Orlando, FL
Old 07-24-2023 , 20:29   Re: [L4D & L4D2] Left 4 DHooks Direct (1.134) [10-Jul-2023]
Reply With Quote #946

Hi @Silvers!

In a future release of this plugin, could you please add the target/subject for the L4D2_BackpackItem_StartAction forwards? The first_aid_kit and defibrillator should always have a target. Not sure what the target should be for ammo upgrades... maybe the world?
Mystik Spiral is offline
BRU7US
Member
Join Date: Jul 2020
Location: Tatarstan, Kazan
Old 07-25-2023 , 18:16   Re: [L4D & L4D2] Left 4 DHooks Direct (1.134) [10-Jul-2023]
Reply With Quote #947

Quote:
Originally Posted by Mystik Spiral View Post
Hi @Silvers!

In a future release of this plugin, could you please add the target/subject for the L4D2_BackpackItem_StartAction forwards? The first_aid_kit and defibrillator should always have a target. Not sure what the target should be for ammo upgrades... maybe the world?
Maybe...

stock int L4D2_GetPlayerUseActionTarget(int client)

//client - player who using medkit / defibrillator
BRU7US is online now
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 07-25-2023 , 18:28   Re: [L4D & L4D2] Left 4 DHooks Direct (1.134) [10-Jul-2023]
Reply With Quote #948

Quote:
Originally Posted by BRU7US View Post
Maybe...

stock int L4D2_GetPlayerUseActionTarget(int client)

//client - player who using medkit / defibrillator
This is for L4D2 only and would only work in the post hooks.

Use the native: L4D_FindUseEntity and see the include file for details.
__________________
Silvers is offline
Mystik Spiral
Senior Member
Join Date: Oct 2020
Location: Orlando, FL
Old 07-25-2023 , 23:34   Re: [L4D & L4D2] Left 4 DHooks Direct (1.134) [10-Jul-2023]
Reply With Quote #949

Hi @Silvers!

I am not sure if I understood your reply (or you were only replying to @BRU7US). I was hoping the L4D2_BackpackItem_StartAction forward could include the target player being healed or revived by the client. Something like this:

forward Action L4D2_BackpackItem_StartAction(int client, int target, int entity, any type);

There are certain conditions with client and target where I want to block that action (for human players) with Plugin_Handled. I realize this was not your original intention when creating this, but it would be very helpful to have target as well as client so this forward can be used for more purposes.

EDIT: Something like the heal_begin event, except Plugin_Handled for that does not block the action.

Last edited by Mystik Spiral; 07-25-2023 at 23:40.
Mystik Spiral is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 07-26-2023 , 04:02   Re: [L4D & L4D2] Left 4 DHooks Direct (1.134) [10-Jul-2023]
Reply With Quote #950

Quote:
Originally Posted by Mystik Spiral View Post
-
PHP Code:
/**
 * @brief Finds the Use client/entity if available
 * @remarks See the "L4D1_FirstAidKit_StartHealing" and "L4D2_BackpackItem_StartAction" pre hook forwards for examples of usage and games range values
 *
 * @param client            Client ID of the person to check
 * @param players            True = only search for players, false = search for any use entity
 * @param range                Maximum distance to search for a usable entity
 *
 * @return                    Entity index or maybe 0 or -1 if none (not validated). May return an attached entity on the client (for example prop_dynamic) or other nearby entities
 */
native int L4D_FindUseEntity(int clientbool players falsefloat range 96.0); 


You should look at the test plugin for examples on the forwards/natives etc, it already demonstrates and explains all of this.
__________________

Last edited by Silvers; 07-26-2023 at 04:03.
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 08:09.


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