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

Using SourceHook


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
BeetleFart
SourceMod Donor
Join Date: Apr 2004
Old 11-06-2008 , 14:07   Re: Using SourceHook
Reply With Quote #14

Im now trying to hook
the WeaponCanUse virtual function

SH_DECL_MANUALHOOK1(WeaponCanUseHook, 0, 0, 0, bool, CBaseCombatWeapon *);
declared globally

i added into clientactive:

int Offset=216;
SH_MANUALHOOK_RECONFIGURE(WeaponCanUseHook, Offset, 0, 0);
SH_ADD_MANUALHOOK_MEMFUNC(WeaponCanUseHook, pBase, &g_EmtpyServerPlugin, &CEmptyServerPlugin::WeaponCanUseFunction, false);

and have:
bool CEmptyServerPlugin::WeaponCanUseFunction(CBas eCombatWeapon *pWeapon)
{
RETURN_META_VALUE(MRES_IGNORED, false);
}

and it appears to hook etc...but when the WeaponCanUseFunction is called
it comes up with and ESP problem with parameters not being stored correctly across the function call and Dont know what Im doing wrong.
I want to hook if someone can use a specific weapon .
What am I doing incorrectly?
__________________
CSource Server:
69.90.34.10:27015 Beetlesmod.com And CS-Addicts{US}



http://www.clanuseast.com
BeetleFart is offline
 



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 16:48.


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