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

Problem with hook FireBullets3


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bos93
Veteran Member
Join Date: Jul 2010
Old 01-29-2014 , 03:07   Problem with hook FireBullets3
Reply With Quote #1

Hi.

OS: Windows.

PHP Code:
void FireBullets3void *pPrivateVector vecSrcVector vecDirfloat flSpreadfloat flDistint iPenetrationint bulletTypeint iDamagefloat rangeModentvars_s pevAttackerbool isPistolint sharedRand 

    
printf("FireBullets3 Hook Pre! %d | %d | %f\n"ENTINDEX(pevAttacker->pContainingEntity), isPistolflDist);


    
UnsetHook(&g_funcFireBullets3_DLL);
    
reinterpret_cast<FuncFireBullets3>(g_funcFireBullets3_DLL.address)( pPrivatevecSrcvecDirflSpreadflDistiPenetrationbulletTypeiDamagerangeModpevAttackerisPistolsharedRand );
    
SetHook(&g_funcFireBullets3_DLL);


After the call to the server crashes. Arguments in the message right.

But, with Vector* __fastcall , function doesn't called. ( https://forums.alliedmods.net/showpo...85&postcount=2 )
__________________
Bos93 is offline
Send a message via ICQ to Bos93 Send a message via Skype™ to Bos93
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 01-30-2014 , 11:57   Re: Problem with hook FireBullets3
Reply With Quote #2

Quote:
Originally Posted by Bos93 View Post
Hi.

OS: Windows.

PHP Code:
void FireBullets3void *pPrivateVector vecSrcVector vecDirfloat flSpreadfloat flDistint iPenetrationint bulletTypeint iDamagefloat rangeModentvars_s pevAttackerbool isPistolint sharedRand 

    
printf("FireBullets3 Hook Pre! %d | %d | %f\n"ENTINDEX(pevAttacker->pContainingEntity), isPistolflDist);


    
UnsetHook(&g_funcFireBullets3_DLL);
    
reinterpret_cast<FuncFireBullets3>(g_funcFireBullets3_DLL.address)( pPrivatevecSrcvecDirflSpreadflDistiPenetrationbulletTypeiDamagerangeModpevAttackerisPistolsharedRand );
    
SetHook(&g_funcFireBullets3_DLL);


After the call to the server crashes. Arguments in the message right.

But, with Vector* __fastcall , function doesn't called. ( https://forums.alliedmods.net/showpo...85&postcount=2 )
https://forums.alliedmods.net/showpo...85&postcount=2 -> That's FireBulletsPlayer, nothing to do with FireBullets3

FireBullets3 returns a vector, and if you're using windows, remember that you must add a dummy parameter after the CBaseEntity member parameter
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS 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 15:34.


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