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
ProjectSky
AlliedModders Donor
Join Date: Aug 2020
Old 10-16-2022 , 09:34   Re: [L4D & L4D2] Left 4 DHooks Direct (1.119) [15-Oct-2022]
Reply With Quote #781

test.smx
PHP Code:
#pragma semicolon 1
#pragma newdecls required

#include <sourcemod>
#include <left4dhooks>

public Action L4D2_OnGetScriptValueInt(const char[] keyint &retValint hScope)
{
    
PrintToChatAll("key: %s, value: %d, scope: %d"keyretValhScope);
    return 
Plugin_Continue;

load test.smx and using sm_l4dhooks_detours command server crashes
ProjectSky is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 10-16-2022 , 09:58   Re: [L4D & L4D2] Left 4 DHooks Direct (1.119) [15-Oct-2022]
Reply With Quote #782

Quote:
Originally Posted by ProjectSky View Post
load test.smx and using sm_l4dhooks_detours command server crashes
Windows, Linux? If after map change that will be fixed soon, Forgetest reported this to me.
__________________
Silvers is offline
ProjectSky
AlliedModders Donor
Join Date: Aug 2020
Old 10-16-2022 , 10:22   Re: [L4D & L4D2] Left 4 DHooks Direct (1.119) [15-Oct-2022]
Reply With Quote #783

Quote:
Originally Posted by Silvers View Post
Windows, Linux? If after map change that will be fixed soon, Forgetest reported this to me.
linux. yes no crash after changing the map
but L4D2_OnGetScriptValueInt no output any value is this normal?
ProjectSky is offline
NoroHime
Veteran Member
Join Date: Aug 2016
Location: bed
Old 10-16-2022 , 16:02   Re: [L4D & L4D2] Left 4 DHooks Direct (1.119) [15-Oct-2022]
Reply With Quote #784

hey silvers, could you check the Terror_GetAdrenalineTime correctness?
im found a problem when adrenaline duration be gone, then Terror_GetAdrenalineTime return 15s again
is that netprop bugs? or some offset need to change
__________________

Last edited by NoroHime; 10-16-2022 at 16:02.
NoroHime is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 10-20-2022 , 16:19   Re: [L4D & L4D2] Left 4 DHooks Direct (1.120) [20-Oct-2022]
Reply With Quote #785

Code:
1.120 (20-Oct-2022)
    - Update for L4D2.

    - Added native "L4D2_CommandABot" to command a bots actions.
    - Added native "L4D2_GetScriptScope" to get an entities script ID. Thanks to "Forgetest" for help.
    - Added native "L4D2_GetVScriptEntity" to get a VScript "logic_script" entity index.
    - Added native "L4D2_IsVisibleToPlayer" to get a VScript "logic_script" entity index. Requested by "morzlee", thanks to "fdxx" and "Psyk0tik" for the code and gamedata.
    - Fixed native "ITimer_GetTimestamp" using the wrong stock and returning the wrong values. Thanks to "Forgetest" for reporting.
    - L4D2: Fixed forward "L4D2_OnGetScriptValueVector" not returning a vector value and not setting the value when changed.
    - Fixed forwards "L4D2_OnGetScriptValue*" not working after map change. Thanks to "Forgetest" for reporting.

    - Updated: Plugin and test plugin.
    - Updated: "left4dhooks.inc" Include file.
    - Updated: "left4dhooks.l4d2.txt" GameData 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.
__________________
Silvers is offline
Letsdoit
Senior Member
Join Date: Feb 2010
Old 10-23-2022 , 22:51   Re: [L4D & L4D2] Left 4 DHooks Direct (1.120) [20-Oct-2022]
Reply With Quote #786

There's a way to block addons from being load on L4D? There's a ton of mathacks/wallhacks that are loaded in the game using this way and AddonsEclipse is just perfect to counter this.
Letsdoit is offline
Send a message via MSN to Letsdoit
Beatles
Senior Member
Join Date: Feb 2014
Old 10-26-2022 , 20:39   Re: [L4D & L4D2] Left 4 DHooks Direct (1.120) [20-Oct-2022]
Reply With Quote #787

Quote:
Originally Posted by Silvers View Post
Code:
1.120 (20-Oct-2022)
    - Update for L4D2.

    - Added native "L4D2_CommandABot" to command a bots actions.
    - Added native "L4D2_GetScriptScope" to get an entities script ID. Thanks to "Forgetest" for help.
    - Added native "L4D2_GetVScriptEntity" to get a VScript "logic_script" entity index.
    - Added native "L4D2_IsVisibleToPlayer" to get a VScript "logic_script" entity index. Requested by "morzlee", thanks to "fdxx" and "Psyk0tik" for the code and gamedata.
    - Fixed native "ITimer_GetTimestamp" using the wrong stock and returning the wrong values. Thanks to "Forgetest" for reporting.
    - L4D2: Fixed forward "L4D2_OnGetScriptValueVector" not returning a vector value and not setting the value when changed.
    - Fixed forwards "L4D2_OnGetScriptValue*" not working after map change. Thanks to "Forgetest" for reporting.

    - Updated: Plugin and test plugin.
    - Updated: "left4dhooks.inc" Include file.
    - Updated: "left4dhooks.l4d2.txt" GameData 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.
Hey bro, I have a problem, I installed the latest version and I get this error
PHP Code:
L 10/26/2022 19:31:20SourceMod error session started
L 10
/26/2022 19:31:20Info (map "l4d_hospital01_apartment") (file "C:\Program Files (x86)\Steam\steamapps\common\left 4 dead\left4dead\addons\sourcemod\logs\errors_20221026.log")
L 10/26/2022 19:31:20: [left4dhooks.smxFailed to find signature"IsVisibleToPlayer" (WIN/1/1.120)
L 10/26/2022 19:31:40Error log file session closed
Beatles is offline
Forgetest
Member
Join Date: Aug 2020
Old 11-03-2022 , 05:07   Re: [L4D & L4D2] Left 4 DHooks Direct (1.120) [20-Oct-2022]
Reply With Quote #788

PHP Code:
        "Functions"
        
{
            
"L4DD::CTerrorPlayer::OnSlammedSurvivor"
            
{
                
"signature"        "CTerrorPlayer::OnSlammedSurvivor"
                "callconv"        "thiscall"
                "return"        "void"
                "this"            "entity"
                "arguments"
                
{
                    
"pVictim"
                    
{
                        
"type"    "cbaseentity"
                    
}
                    
"bWallSlam"
                    
{
                        
"type"    "bool"
                    
}
                    
"bDeadlyCharge"
                    
{
                        
"type"    "bool"
                    
}
                }
            }
        }

        
"Signatures"
        
{
            
"CTerrorPlayer::OnSlammedSurvivor"
            
{
                
"library"        "server"
                "linux"            "@_ZN13CTerrorPlayer17OnSlammedSurvivorEPS_bb"
                "windows"        "\x55\x8B\xEC\x83\xEC\x2A\xD9\xEE\x56\x57\x6A\x00\x51\xD9\x2A\x24\x68\x2A\x2A\x2A\x2A\x8B\x2A\xE8\x2A\x2A\x2A\x2A\xF3\x0F"
                
/* 55 8B EC 83 EC ? D9 EE 56 57 6A 00 51 D9 ? 24 68 ? ? ? ? 8B ? E8 ? ? ? ? F3 0F */
            
}
        } 
Can I request this as a new forward?
Funny story that not even a single event indicates a slam has (potentially) happened.

Maybe hook both pre and post (post-handled? blocking this may lead to a lot of issues so suggest Plugin_Handled be used for overrding params)

P.S. The param bDeadlyCharge indicates the carry ends at a height down 360.0 units from the carry start, and adds DMG_PARALYZE to the damage flags to incap the victim.
Forgetest is offline
Forgetest
Member
Join Date: Aug 2020
Old 11-03-2022 , 05:37   Re: [L4D & L4D2] Left 4 DHooks Direct (1.120) [20-Oct-2022]
Reply With Quote #789

PHP Code:
static int L4D2_OffsQueuedPummelInfo()
{
    static 
int m_hQueuedPummelVictim = -1;
    if ( 
m_hQueuedPummelVictim == -)
        
m_hQueuedPummelVictim FindSendPropInfo("CTerrorPlayer""m_pummelAttacker") + 4;
    
    return 
m_hQueuedPummelVictim;
}

stock int L4D2_GetQueuedPummelStartTime(int client)
{
    return 
GetEntDataFloat(clientL4D2_OffsQueuedPummelInfo() + 4);
}

stock int L4D2_IsInQueuedPummel(int client)
{
    
float flTimestamp L4D2_GetQueuedPummelStartTime(client);
    
    return 
flTimestamp != -1.0 && flTimestamp GetGameTime();
}

stock int L4D2_GetQueuedPummelVictim(int client)
{
    return 
GetEntDataEnt2(clientL4D2_OffsQueuedPummelInfo());
}

stock int L4D2_GetQueuedPummelAttacker(int client)
{
    return 
GetEntDataEnt2(clientL4D2_OffsQueuedPummelInfo() + 8);

A few helpful stocks related to the transition between slam and pummel.
Not needed here but appreciate if you could add them as well.
Feel free to correct as I'm likely to miss something, and bad naming
Forgetest is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 11-06-2022 , 12:16   Re: [L4D & L4D2] Left 4 DHooks Direct (1.121) [06-Nov-2022]
Reply With Quote #790

Code:
1.121 (06-Nov-2022)
    - Added native "L4D_AreAllSurvivorsInFinaleArea". Requested by "Eärendil".
    - Fixed native "L4D2_SpitterPrj" to not emit duplicate sounds from regular Spitter projectiles and playback at about the same volume as default.
    - L4D2: Added forwards "L4D2_OnSlammedSurvivor" and "L4D2_OnSlammedSurvivor_Post" when a Survivor is carried by a Charger and slammed into a wall. Thanks to "Forgetest" for adding.
    - L4D2: Added stocks "L4D2_GetQueuedPummelStartTime", "L4D2_IsInQueuedPummel", "L4D2_GetQueuedPummelAttacker" and "L4D2_GetQueuedPummelVictim" to the "left4dhooks_silver.inc" include file.
    - L4D1: Fixed trying to load the "IsVisibleToPlayer" signature. Thanks to "HarryPotter" for reporting.
    - Fixed stocks "IsUsingMinigun" and "StopUsingMinigun" throwing errors from the "left4dhooks_silver.inc" include file. Plugins must recompile to fix this error. Thanks to "HarryPotter" for reporting.

    - Updated: Plugin and test plugin.
    - Updated: "left4dhooks.inc" Include file.
    - Updated: "left4dhooks_silver.inc" Include file.
    - Updated: "left4dhooks.l4d1.txt" GameData file.
    - Updated: "left4dhooks.l4d2.txt" GameData 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.
__________________
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 17:39.


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