Raised This Month: $ Target: $400
 0% 

Hooking weapon fire - TF2


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Nano2e
SourceMod Donor
Join Date: Apr 2012
Location: Australia
Old 11-30-2012 , 18:36   Hooking weapon fire - TF2
Reply With Quote #1

Iv been reading on how to try and hook when a weapon is shot in tf2, i know that tf2 doesnt have a real method of getting this. I got CBasePlayer::Weapon_ShootPosition(void) working via dukehacks though this produces wrong (very off) results for what i need it for, iv also looked at the crit emulator though i run no crits for comp play

Is there any other ways that do not need crits on to do this properly?
__________________
Veni Vidi Vici
Nano2e is offline
pheadxdll
AlliedModders Donor
Join Date: Jun 2008
Old 11-30-2012 , 21:05   Re: Hooking weapon fire - TF2
Reply With Quote #2

This wouldn't be of any use would it: https://forums.alliedmods.net/showthread.php?p=1666652
__________________
pheadxdll is offline
Nano2e
SourceMod Donor
Join Date: Apr 2012
Location: Australia
Old 11-30-2012 , 21:09   Re: Hooking weapon fire - TF2
Reply With Quote #3

i fixed that up but it produces alot of wrong things (being called more then once when 1 shot is fired and what not) :[
__________________
Veni Vidi Vici
Nano2e is offline
11530
Veteran Member
Join Date: Sep 2011
Location: Underworld
Old 12-01-2012 , 02:14   Re: Hooking weapon fire - TF2
Reply With Quote #4

If just hooking hitscan weps: SDKHook_FireBulletsPost
__________________

Last edited by 11530; 12-01-2012 at 02:19.
11530 is offline
psychonic

BAFFLED
Join Date: May 2008
Old 12-01-2012 , 10:24   Re: Hooking weapon fire - TF2
Reply With Quote #5

Quote:
Originally Posted by 11530 View Post
If just hooking hitscan weps: SDKHook_FireBulletsPost
TF2 doesn't call FireBullets.
psychonic is offline
sneakret
Member
Join Date: Jul 2012
Old 12-02-2012 , 14:40   Re: Hooking weapon fire - TF2
Reply With Quote #6

Quote:
Originally Posted by Nano2e View Post
Iv been reading on how to try and hook when a weapon is shot in tf2, i know that tf2 doesnt have a real method of getting this. I got CBasePlayer::Weapon_ShootPosition(void) working via dukehacks though this produces wrong (very off) results for what i need it for, iv also looked at the crit emulator though i run no crits for comp play

Is there any other ways that do not need crits on to do this properly?
Have you considered turning crits on just so you can use the crit check method, but then forcing all hits to be non-crits?
sneakret is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 12-02-2012 , 14:42   Re: Hooking weapon fire - TF2
Reply With Quote #7

Quote:
Originally Posted by sneakret View Post
Have you considered turning crits on just so you can use the crit check method, but then forcing all hits to be non-crits?
Sadly, that is a long workaround. Clients will think they are getting crits
Mitchell is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 12-02-2012 , 17:24   Re: Hooking weapon fire - TF2
Reply With Quote #8

Quote:
Originally Posted by Mitchell View Post
Sadly, that is a long workaround. Clients will think they are getting crits
Plus, it may interfere with the Flare Gun, Detonator, Kritzkrieg effect, and Frontier Justice although I'm not positive about that.
__________________
Not currently working on SourceMod plugin development.
Powerlord 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 22:44.


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