[TF2] Hooking when a player fires a weapon
1 Attachment(s)
So, tWeaponShootPosition didn't worked in my Windows machine, so... using VTable Dumper i've tried DHooking CBasePlayer::OnMyWeaponFired myself for the first time, and it worked perfectly as a replacement for it.
What's it's functionality? OnMyWeaponFired is a function called when you... shot your weapon/fire your melee, as the name says... It can also be used as a replacement for CalcAttackIsCritical if you just want to know when a player shoot Might make a plugin with a forward for it someday, but for now... Here's the example code: Code:
#pragma semicolon 1NOTE 2: You're going to need DHooks for getting this working Gamedata file download: |
Re: [TF2] Hooking when a player fire a weapon
Do you mind if I build this into my API plugin? (found here: https://github.com/Drixevel/TF2-API)
|
Re: [TF2] Hooking when a player fire a weapon
Neat work man :bacon!: wish I had this when I was into TF2.
|
Re: [TF2] Hooking when a player fire a weapon
Quote:
|
| All times are GMT -4. The time now is 23:30. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.