Raised This Month: $32 Target: $400
 8% 

[L4D2] Hook client weapon changed


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mcpan313
Senior Member
Join Date: Mar 2010
Old 04-20-2012 , 04:59   [L4D2] Hook client weapon changed
Reply With Quote #1

SendProxy Manager can easy hook m_hActiveWeapon change, but this ext not support L4D2. Have other ways can do it?
__________________
sorry, for my poor english.
mcpan313 is offline
Send a message via MSN to mcpan313
GNCMatt
Member
Join Date: Apr 2009
Old 04-21-2012 , 14:33   Re: [L4D2] Hook client weapon changed
Reply With Quote #2

You can check m_hActiveWeapon manually in a loop.

PHP Code:
new weapon GetEntPropEnt(clientProp_Send"m_hActiveWeapon"); 
__________________
GNCMatt is offline
blodia
Veteran Member
Join Date: Sep 2009
Location: UK
Old 04-21-2012 , 15:12   Re: [L4D2] Hook client weapon changed
Reply With Quote #3

the "weapon" parameter in OnPlayerRunCmd is non zero when the client changes weapon, its the index of the weapon entity they're switching to. doesn't sdkhooks weapon switch hooks work in l4d2?

Last edited by blodia; 04-21-2012 at 15:13.
blodia is offline
McFlurry
Veteran Member
Join Date: Mar 2010
Location: RemoveEdict(0);
Old 04-21-2012 , 17:39   Re: [L4D2] Hook client weapon changed
Reply With Quote #4

Weapon switch hooks do work in L4D2. Use those to detect when a weapon is about to be equipped.
__________________
McFlurry is offline
Send a message via Skype™ to McFlurry
mcpan313
Senior Member
Join Date: Mar 2010
Old 04-22-2012 , 04:47   Re: [L4D2] Hook client weapon changed
Reply With Quote #5

Quote:
Originally Posted by blodia View Post
the "weapon" parameter in OnPlayerRunCmd is non zero when the client changes weapon, its the index of the weapon entity they're switching to. doesn't sdkhooks weapon switch hooks work in l4d2?
Quote:
Originally Posted by McFlurry View Post
Weapon switch hooks do work in L4D2. Use those to detect when a weapon is about to be equipped.
thx, I try it.
__________________
sorry, for my poor english.

Last edited by mcpan313; 04-22-2012 at 04:49.
mcpan313 is offline
Send a message via MSN to mcpan313
Reply


Thread Tools
Display Modes

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 10:06.


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