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

[TF2]Hook player shot


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BraveFox
AlliedModders Donor
Join Date: May 2015
Location: Israel
Old 04-14-2018 , 02:50   [TF2]Hook player shot
Reply With Quote #1

Hey,
I need to hook the player shot, I mean when he shot.
In csgo you can simply use "weapon_fire" but it doesn't exist in TF2.
I've also tried to use "player_shoot" but doesn't work.
I was also told that "SDKHook_FireBulletsPost" doesn't work on TF2.
So how can I hook it?
thanks for the helpers!
__________________
Contact Me:
Steam: NoyB
Discord: Noy#9999
Taking Private Requests

Last edited by asherkin; 10-25-2018 at 17:06. Reason: Restore to previous version.
BraveFox is offline
BraveFox
AlliedModders Donor
Join Date: May 2015
Location: Israel
Old 04-14-2018 , 09:01   Re: [TF2]Hook player shot
Reply With Quote #2

Solved using:
Quote:
public Action TF2_CalcIsAttackCritical(int client, int weapon, char weaponname[], &bool result)
__________________
Contact Me:
Steam: NoyB
Discord: Noy#9999
Taking Private Requests
BraveFox is offline
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Somewhere headbangin'
Old 04-14-2018 , 10:34   Re: [TF2]Hook player shot
Reply With Quote #3

Keep in mind that 'TF2_CalcIsAttackCritical' doesn't fire between rounds, only during rounds.
Drixevel is offline
BraveFox
AlliedModders Donor
Join Date: May 2015
Location: Israel
Old 04-29-2018 , 14:33   Re: [TF2]Hook player shot
Reply With Quote #4

Quote:
Originally Posted by Drixevel View Post
Keep in mind that 'TF2_CalcIsAttackCritical' doesn't fire between rounds, only during rounds.
I needed it for shot4shot so it's only during the round.
__________________
Contact Me:
Steam: NoyB
Discord: Noy#9999
Taking Private Requests
BraveFox 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 06:25.


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