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

[TF2] Request:- Stun Wrench


Post New Thread Reply   
 
Thread Tools Display Modes
psychonic

BAFFLED
Join Date: May 2008
Old 12-02-2010 , 20:27   Re: [TF2] Request:- Stun Wrench
Reply With Quote #21

Quote:
Originally Posted by max42 View Post
lol i found a bug

if u build a normal sentry and keep you wrench out when the sentry attacks the other team it bonks them as well

anyway round this ?
The version I posted does not have this issue. It looks at the actual weapon, not just whatever you have out.
psychonic is offline
Tylerst
Veteran Member
Join Date: Oct 2010
Old 12-02-2010 , 23:48   Re: [TF2] Request:- Stun Wrench
Reply With Quote #22

Quote:
Originally Posted by psychonic View Post
The version I posted does not have this issue. It looks at the actual weapon, not just whatever you have out.
Except that yours doesn't work

player_hurt doesnt have weapon_logclassname, only player_death has that.

player_hurt only has weaponid


Anyway...Wasn't even thinking about sentrys.
Not sure how to fix it with player_hurt, might have to use sdkhooks and OnTakeDamage

I'm too tired to tinker with it tonight, I'll try messing with it later.

Last edited by Tylerst; 12-02-2010 at 23:57.
Tylerst is offline
psychonic

BAFFLED
Join Date: May 2008
Old 12-03-2010 , 00:00   Re: [TF2] Request:- Stun Wrench
Reply With Quote #23

Quote:
Originally Posted by Tylerst View Post
Except that yours doesn't work

player_hurt doesnt have weapon_logclassname, only player_death has that.

player_hurt only has weaponid
d'oh. I guess i was forgetting that it was player_hurt, not player_death.

There really isn't enough info on the player_hurt event to tell definitively without hackery such as looking to see if the player_hurt was the first hurt for the attacker after the attacker attacked with the wrench (detectable via TF2_CalcIsAttackCritical).
psychonic is offline
Swixel
Senior Member
Join Date: Jul 2010
Location: Sydney, Australia
Old 12-03-2010 , 18:32   Re: [TF2] Request:- Stun Wrench
Reply With Quote #24

Quote:
Originally Posted by psychonic View Post
d'oh. I guess i was forgetting that it was player_hurt, not player_death.

There really isn't enough info on the player_hurt event to tell definitively without hackery such as looking to see if the player_hurt was the first hurt for the attacker after the attacker attacked with the wrench (detectable via TF2_CalcIsAttackCritical).
You could just use tsunami's SDKHooks, which provides you with what you need and won't break the SG...
Swixel is offline
Tylerst
Veteran Member
Join Date: Oct 2010
Old 12-04-2010 , 07:46   Re: [TF2] Request:- Stun Wrench
Reply With Quote #25

Quote:
Originally Posted by max42 View Post
lol i found a bug

if u build a normal sentry and keep you wrench out when the sentry attacks the other team it bonks them as well

anyway round this ?
Sorry about not getting this done yesterday like I said in the last post, I ended up not having time to recode/test it.

Updated the plugin to use sdkhooks OnTakeDamage

I tested it successfully too, so it should work for you if you have sdkhooks installed(if not you can get it from here)
Attached Files
File Type: sp Get Plugin or Get Source (stunwrench_sdkhooks.sp - 142 views - 1.2 KB)

Last edited by Tylerst; 12-04-2010 at 07:55.
Tylerst is offline
max42
Member
Join Date: Nov 2009
Old 12-04-2010 , 14:24   Re: [TF2] Request:- Stun Wrench
Reply With Quote #26

works perfectly great work tylerst
max42 is offline
danmon
Member
Join Date: Oct 2010
Old 12-11-2010 , 23:07   Re: [TF2] Request:- Stun Wrench
Reply With Quote #27

Quote:
Originally Posted by Tylerst View Post
Sorry about not getting this done yesterday like I said in the last post, I ended up not having time to recode/test it.

Updated the plugin to use sdkhooks OnTakeDamage

I tested it successfully too, so it should work for you if you have sdkhooks installed(if not you can get it from here)
could you add a enable and disable cvar?
danmon is offline
Tylerst
Veteran Member
Join Date: Oct 2010
Old 12-12-2010 , 11:05   Re: [TF2] Request:- Stun Wrench
Reply With Quote #28

Quote:
Originally Posted by danmon View Post
could you add a enable and disable cvar?
Sure

sm_stunwrench_enabled 1/0
Attached Files
File Type: sp Get Plugin or Get Source (stunwrench_sdkhooks.sp - 137 views - 1.4 KB)

Last edited by Tylerst; 12-12-2010 at 11:08.
Tylerst 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 02:37.


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