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

[TF2]Backstab Control


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Paah
Junior Member
Join Date: Jan 2010
Old 06-27-2010 , 16:12   [TF2]Backstab Control
Reply With Quote #1

How do you hook a backstab?
Can you modify the damage of the stab?
Can you prevent spy from losing disguise on stab, or atleast get the disguise reapplied so quickly sentries can't even make beep?
Can you prevent victim from having any visual/audio about getting stabbed, unless they die of course?
Can you fake a backstab so you get to set who dies and who stabbed them and the stabber gets points and all that?

I really don't know much about backstabs ._.
Would greatly appreciate some help.
Paah is offline
noodleboy347
AlliedModders Donor
Join Date: Mar 2009
Old 06-27-2010 , 19:54   Re: [TF2]Backstab Control
Reply With Quote #2

1) Hook player_death, look for weapon backstab.
2) Not afaik
3) You can reapply the disguise, I think instantly too
4) You could block the sound but not the damage indicator
5) I don't think so
noodleboy347 is offline
Paah
Junior Member
Join Date: Jan 2010
Old 06-28-2010 , 02:48   Re: [TF2]Backstab Control
Reply With Quote #3

So the weapon is called backstab? I did some reading and I thought weapon was knife and it was "customkill" or something.. Meh, I have to do some testing.
Paah is offline
Pawn 3-pg
Senior Member
Join Date: Jul 2009
Old 06-28-2010 , 10:17   Re: [TF2]Backstab Control
Reply With Quote #4

Quote:
Originally Posted by Paah View Post
Can you modify the damage of the stab?
SDKHooks can change the damage with the OnTakeDamage hook.
Pawn 3-pg is offline
CarlZalph
Junior Member
Join Date: May 2010
Old 06-29-2010 , 11:55   Re: [TF2]Backstab Control
Reply With Quote #5

Quote:
Originally Posted by Pawn 3-pg View Post
SDKHooks can change the damage with the OnTakeDamage hook.
Or, without that extension:

Hook the player_hurt event.
Check the "damageamount" from the event, and make sure it's over 100.
(Spy knife doesn't do more than 100 on normal swings, ever.)
Get the short value "weaponid" from the event, which is the entity index.
Get the weapon's name by GetEdictClassname().
Compare it with "tf_weapon_knife".
If it is that weapon, then give the client his health back.
Could save his current velocity and apply it .1 seconds later to stop any force obtained from the damage received.

That's just an alternative if you don't like extensions.
CarlZalph is offline
dirtyminuth
Senior Member
Join Date: Sep 2009
Old 06-29-2010 , 12:03   Re: [TF2]Backstab Control
Reply With Quote #6

I thought giving health back based on the player_hurt event would not prevent death (i.e. you could not stop backstabs via the player_hurt event).
__________________
dirtyminuth is offline
CarlZalph
Junior Member
Join Date: May 2010
Old 06-29-2010 , 12:10   Re: [TF2]Backstab Control
Reply With Quote #7

Quote:
Originally Posted by dirtyminuth View Post
I thought giving health back based on the player_hurt event would not prevent death (i.e. you could not stop backstabs via the player_hurt event).
Just add the health to the victim that the event would have done, and he won't die.
CarlZalph is offline
AtomicStryker
Veteran Member
Join Date: Apr 2009
Location: Teutonia!!
Old 06-29-2010 , 12:16   Re: [TF2]Backstab Control
Reply With Quote #8

Cant stop death with playe_hurt as its POST. SDKHooks is the way to go.
AtomicStryker is offline
CarlZalph
Junior Member
Join Date: May 2010
Old 06-29-2010 , 12:50   Re: [TF2]Backstab Control
Reply With Quote #9

Quote:
Originally Posted by AtomicStryker View Post
Cant stop death with playe_hurt as its POST. SDKHooks is the way to go.
I'd really beg to differ on that.

You can, and it's possible.
Not going to argue facts here.
CarlZalph is offline
Dragonshadow
BANNED
Join Date: Jun 2008
Old 06-29-2010 , 14:52   Re: [TF2]Backstab Control
Reply With Quote #10

Quote:
Originally Posted by Paah View Post
How do you hook a backstab?
Can you modify the damage of the stab?
Can you prevent spy from losing disguise on stab, or atleast get the disguise reapplied so quickly sentries can't even make beep?
Can you prevent victim from having any visual/audio about getting stabbed, unless they die of course?
Can you fake a backstab so you get to set who dies and who stabbed them and the stabber gets points and all that?

I really don't know much about backstabs ._.
Would greatly appreciate some help.
SDKHooks
Probably
uhh don't think so, that's clientside
yes, block the damage with sdkhooks then reapply it with a point hurt entity.
Dragonshadow 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 23:36.


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