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

Weapon Reload hook doesn't get the automatic reloads?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kigen
BANNED
Join Date: Feb 2008
Old 07-12-2008 , 08:08   Weapon Reload hook doesn't get the automatic reloads?
Reply With Quote #1

From what I've seen, the "weapon_reload" hook doesn't get called when an automatic weapon reload is performed.

It would be nice if it did.
Kigen is offline
Greyscale
SourceMod Plugin Approver
Join Date: Dec 2007
Location: strYoMommasHouse[you];
Old 07-12-2008 , 13:16   Re: Weapon Reload hook doesn't get the automatic reloads?
Reply With Quote #2

You'd need to talk to valve about that one
__________________
Greyscale is offline
DiscoBBQ
Veteran Member
Join Date: Jan 2005
Location: Clemson, South Carolina
Old 07-12-2008 , 21:58   Re: Weapon Reload hook doesn't get the automatic reloads?
Reply With Quote #3

You can check for the buttons they push and when they hit reload you can hook your function there. Check into entity_prop_stocks for the button Id's and use 'GetClientButtons'.
__________________
"Every man is guilty of all the good he did not do"
DiscoBBQ is offline
Greyscale
SourceMod Plugin Approver
Join Date: Dec 2007
Location: strYoMommasHouse[you];
Old 07-13-2008 , 02:08   Re: Weapon Reload hook doesn't get the automatic reloads?
Reply With Quote #4

He's saying it doesn't fire if they shoot till they are out of ammo and then the game reloads for you (+reload is never executed)
__________________
Greyscale is offline
Kigen
BANNED
Join Date: Feb 2008
Old 07-13-2008 , 07:18   Re: Weapon Reload hook doesn't get the automatic reloads?
Reply With Quote #5

"weapon_reload" gets called when the player initiates the reload. But when the game forces the reload it does not (i.e., they shoot until they're out of ammo).
Kigen is offline
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 07-23-2008 , 19:35   Re: Weapon Reload hook doesn't get the automatic reloads?
Reply With Quote #6

Was this ever solved? Is there a way to hook automatic reloads?
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline
Greyscale
SourceMod Plugin Approver
Join Date: Dec 2007
Location: strYoMommasHouse[you];
Old 07-23-2008 , 20:21   Re: Weapon Reload hook doesn't get the automatic reloads?
Reply With Quote #7

I believe it's currently impossible. With SM alone that is.

You can check every frame for CWeaponM3::m_fInSpecialReload, or CWeaponXM1014, but thats only for those weapons, doesn't seem to be any other prop offsets you can check.
__________________
Greyscale is offline
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 07-23-2008 , 22:00   Re: Weapon Reload hook doesn't get the automatic reloads?
Reply With Quote #8

I thought there was an m_bReloading, but I can't figure out anymore which class it was in. But anyway, I'm trying to get away from checking every frame, that's why I'm asking
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline
Greyscale
SourceMod Plugin Approver
Join Date: Dec 2007
Location: strYoMommasHouse[you];
Old 07-24-2008 , 03:24   Re: Weapon Reload hook doesn't get the automatic reloads?
Reply With Quote #9

There is no m_bReloading here D:

http://bailopan.net/table_dump.txt
__________________
Greyscale is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 07-24-2008 , 14:04   Re: Weapon Reload hook doesn't get the automatic reloads?
Reply With Quote #10

There's a m_bInReload datamap for each weapon.
bl4nk 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 17:51.


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