Raised This Month: $ Target: $400
 0% 

Can I use Ham_Weapon_PrimaryAttack to hook


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hzqst
Senior Member
Join Date: Jul 2008
Old 12-20-2008 , 20:23   Can I use Ham_Weapon_PrimaryAttack to hook
Reply With Quote #1

1. Can I use Ham_Weapon_PrimaryAttack to hook primary attack event instead of using prethink?
2. Does it work for C4?(press +attack but not planting)
hzqst is offline
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 12-21-2008 , 02:40   Re: Can I use Ham_Weapon_PrimaryAttack to hook
Reply With Quote #2

1. Yes...another method: playbackevent (FM) using primary weapons events, but is more code...(see VEN's tutorial)
2. I think you can use CmdStart, but i'm not sure if that is what you're looking for.

sorry for no examples
__________________

anakin_cstrike is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-21-2008 , 04:17   Re: Can I use Ham_Weapon_PrimaryAttack to hook
Reply With Quote #3

1. You could, but this is called from weapons, not for players, and so you have to register the forward for every weapons type, then you have to filter too know if a shot will be done when the forward is called.
2. Should work.

If you stay with prethink thing, you should really use FM_CmdStart instead.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Reply


Thread Tools
Display Modes

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 09:12.


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