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

Solved [L4D2] different meele range for players


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mich8441012
Junior Member
Join Date: May 2023
Old 06-01-2023 , 08:43   [L4D2] different meele range for players
Reply With Quote #1

Is there a way to set a different meele range for each player?

Last edited by mich8441012; 06-02-2023 at 13:45.
mich8441012 is offline
Paimon
Member
Join Date: Jul 2021
Location: Zootopia
Old 06-01-2023 , 10:58   Re: [L4D2] different meele range for players
Reply With Quote #2

Just an idea, not test.
1.Set server cvar melee range to 9999.
2.Use SDKHook_TraceAttack to trace melee attack.
3.Get distance between victim and attacker.
4.If the distance is greater than attacker's melee range, return handle, else continue.

Last edited by Paimon; 06-01-2023 at 10:59.
Paimon is offline
sorallll
Senior Member
Join Date: Oct 2018
Old 06-01-2023 , 11:29   Re: [L4D2] different meele range for players
Reply With Quote #3

See
sorallll is offline
mich8441012
Junior Member
Join Date: May 2023
Old 06-01-2023 , 11:55   Re: [L4D2] different meele range for players
Reply With Quote #4

Quote:
Originally Posted by Paimon View Post
Just an idea, not test.
1.Set server cvar melee range to 9999.
2.Use SDKHook_TraceAttack to trace melee attack.
3.Get distance between victim and attacker.
4.If the distance is greater than attacker's melee range, return handle, else continue.
Thanks I will try this idea
mich8441012 is offline
mich8441012
Junior Member
Join Date: May 2023
Old 06-01-2023 , 11:57   Re: [L4D2] different meele range for players
Reply With Quote #5

Quote:
Originally Posted by sorallll View Post
Thank you, I also found this plugin before, and I am still researching whether a similar method can be used
mich8441012 is offline
mich8441012
Junior Member
Join Date: May 2023
Old 06-02-2023 , 13:44   Re: [L4D2] different meele range for players
Reply With Quote #6

using like this solves my problem
PHP Code:
MRESReturn TestMeleeSwingCollisionPre(int pThisHandle hReturn)
{
    if( 
IsValidEntity(pThis) )
    {
        
int owner GetEntPropEnt(pThisProp_Send"m_hOwnerEntity");
        if(
StrEqual(Skill_Name[Skill[owner]], "Mana Shield"))
            
g_hCvarMeleeRange.SetInt(g_iManaRange);
        else
            
g_hCvarMeleeRange.SetInt(g_iStockRange);
    }

    return 
MRES_Ignored;

mich8441012 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 06:55.


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