Raised This Month: $ Target: $400
 0% 

Solved Ham_Weapon_SecondaryAttack on elites, for example


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 06-30-2017 , 15:54   Re: Ham_Weapon_SecondaryAttack on elites, for example
Reply With Quote #1

Quote:
Originally Posted by KliPPy View Post
What would probably be the best thing to do is to hook bool CBasePlayerWeapon::HasSecondaryAttack() and to return true from it. You can hook it with Orpheu, Okapi or ReAPI.
He could try to hook ItemPostFrame with hamsandwich and add IN_ATTACK2 to pev_button. Tho this could mess up things, I'm not sure if it's a good ideea.
But yeah, hooking HasSecondaryAttack and altering the return value is by far the best and safest way in case the function is not copied by the compiler where it's used. It's called only from ItemPostFrame, and from what I saw while working with similar functions, some times the compiler just copy/paste the function, so hooking it does nothing, because the original function is never called. If this is the case, then hooking ItemPostFrame and handling that function at a plugin level(redoing the code) would be the solution.
__________________

Last edited by HamletEagle; 06-30-2017 at 15:59.
HamletEagle 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 22:59.


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