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

SDK Hooks 2.1 - Updated 2011-9-10


Post New Thread Closed Thread   
 
Thread Tools Display Modes
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 05-02-2010 , 14:10   Re: [EXTENSION] SDK Hooks 1.3 (Updated 2010-04-29)
#561

For example... ?
PHP Code:
public Action:OnWeaponEquip(clientweapon)
{
    
decl String:sWeapon[32];
    
GetEdictClassname(weaponsWeaponsizeof(sWeapon));
    
    if( 
StrEqual(sWeapon"weapon_melee_tonfa") )
    {
        return 
Plugin_Handled;
    }
    
    return 
Plugin_Continue;

__________________
xbatista is offline
Send a message via Skype™ to xbatista
psychonic

BAFFLED
Join Date: May 2008
Old 05-02-2010 , 14:57   Re: [EXTENSION] SDK Hooks 1.3 (Updated 2010-04-29)
#562

Quote:
Originally Posted by xbatista View Post
For example... ?
PHP Code:
public Action:OnWeaponEquip(clientweapon)
{
    
decl String:sWeapon[32];
    
GetEdictClassname(weaponsWeaponsizeof(sWeapon));
    
    if( 
StrEqual(sWeapon"weapon_melee_tonfa") )
    {
        return 
Plugin_Handled;
    }
    
    return 
Plugin_Continue;

No. It won't be "weapon_melee_tonfa". Like I said twice, all melee in l4d2 are just "weapon_melee".
psychonic is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 05-03-2010 , 08:06   Re: [EXTENSION] SDK Hooks 1.3 (Updated 2010-04-29)
#563

So then whats the classname of specific melee like TONFA???...

psychonic:Triple, weapon_melee ...
__________________
xbatista is offline
Send a message via Skype™ to xbatista
psychonic

BAFFLED
Join Date: May 2008
Old 05-03-2010 , 08:18   Re: [EXTENSION] SDK Hooks 1.3 (Updated 2010-04-29)
#564

Quote:
Originally Posted by xbatista View Post
So then whats the classname of specific melee like TONFA???...
weapon_melee

None of them have specific classnames. If you need to know which specific melee weapon it is, you have to look at the m_strMapSetScriptName dataprop.
psychonic is offline
dirka_dirka
Veteran Member
Join Date: Nov 2009
Old 05-03-2010 , 18:23   Re: [EXTENSION] SDK Hooks 1.3 (Updated 2010-04-29)
#565

xbatista, check the source of this: http://forums.alliedmods.net/showthread.php?t=125808
for melee weapons.
dirka_dirka is offline
deriggs007
Senior Member
Join Date: May 2009
Location: USA
Old 05-03-2010 , 20:14   Re: [EXTENSION] SDK Hooks 1.3 (Updated 2010-04-29)
#566

psychonic - Any possibility for us to continue trying to port this to Dark Messiah?

Would love to get one of your plugins to work with this

Thanks
deriggs007 is offline
Send a message via MSN to deriggs007
HL-SDK
Member
Join Date: Jan 2009
Old 05-03-2010 , 23:02   Re: [EXTENSION] SDK Hooks 1.3 (Updated 2010-04-29)
#567

Everything I've seen on this points to a different location of the m_flDamage for L4D2. +0x30, +0x34 and +0x3C are all floats. My bets are on +0x3C. Will investigate later.


---
EDIT

"psychonicHLSDK: i believe it grew legs and it still moving as we speak"
Yes. I'm unsure about the first 2 again

---
DoubleEdit:

It seems that 0x3C is == 60, the same as the offset in the takedamageinfo class declaration. (I'm counting Vectors as 3 DWORDS and EHANDLES as 1 DWORD).

Last edited by HL-SDK; 05-03-2010 at 23:17.
HL-SDK is offline
psychonic

BAFFLED
Join Date: May 2008
Old 05-03-2010 , 23:26   Re: [EXTENSION] SDK Hooks 1.3 (Updated 2010-04-29)
#568

Quote:
Originally Posted by HL-SDK View Post
Everything I've seen on this points to a different location of the m_flDamage for L4D2. +0x30, +0x34 and +0x3C are all floats. My bets are on +0x3C. Will investigate later.


---
EDIT

"psychonicHLSDK: i believe it grew legs and it still moving as we speak"
Yes. I'm unsure about the first 2 again

---
DoubleEdit:

It seems that 0x3C is == 60, the same as the offset in the takedamageinfo class declaration. (I'm counting Vectors as 3 DWORDS and EHANDLES as 1 DWORD).
^ This is RE: reversing the necessary info for OnTakeDamage to work properly in L4D2.
psychonic is offline
Jоnny
Senior Member
Join Date: Jun 2007
Old 05-04-2010 , 05:53   Re: [EXTENSION] SDK Hooks 1.3 (Updated 2010-04-29)
#569

L4D2 SM 1.3.3
Quote:
public OnClientPutInServer(client)
{
SDKHook(client, SDKHook_OnTakeDamage, OnTakeDamage);
}
Quote:
L 05/04/2010 - 15:50:28: [SM] Native "SDKHook" reported: Hook type not supported on this game
L 05/04/2010 - 15:50:28: [SM] Displaying call stack trace for plugin "l4d2_versus.smx":
L 05/04/2010 - 15:50:28: [SM] [0] Line 50, l4d2_versus.sp::OnClientPutInServer()
Jоnny is offline
psychonic

BAFFLED
Join Date: May 2008
Old 05-04-2010 , 07:47   Re: [EXTENSION] SDK Hooks 1.3 (Updated 2010-04-29)
#570

Quote:
Originally Posted by Jоnny View Post
L4D2 SM 1.3.3



A++ job on ignoring the two posts above yours (as well as the related ones earlier in the thread. As the error message states, that hook is not supported in L4D2 (because the CTakeDamageInfo class is different and yet to be reversed).
psychonic is offline
Closed Thread



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 04:52.


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