Ham_Weapon_PrimaryAttack
Is it possible to detect -attack in Ham_Weapon_PrimaryAttack?
get_pdata_int(id, m_afButtonReleased, XO_CBASEPLAYER) & IN_ATTACK is not working for me. If not then what would be the next best option to detect -attack after doing a couple of checks in Ham_Weapon_PrimaryAttack. |
Re: Ham_Weapon_PrimaryAttack
Show your code
|
Re: Ham_Weapon_PrimaryAttack
My first post had sufficient information to answer the question, but:
PHP Code:
PHP Code:
|
Re: Ham_Weapon_PrimaryAttack
What do you want to check exactly?
|
Re: Ham_Weapon_PrimaryAttack
Within the Ham_Weapon_PrimaryAttack forward, I'm checking if the player released their attack key. Is that even possible as the forward is called when you're holding down attack?
If that is not possible, what would be my best option? Efficiency wise. |
Re: Ham_Weapon_PrimaryAttack
Rather than explaining what you think you need to do ( aka. the XY Problem ) to solve your problem, explain what you are actually trying to achieve in the end.
|
Re: Ham_Weapon_PrimaryAttack
Isn't it possible to just hook the -attack clcmd?
|
Re: Ham_Weapon_PrimaryAttack
Quote:
Quote:
|
Re: Ham_Weapon_PrimaryAttack
Quote:
|
Re: Ham_Weapon_PrimaryAttack
Better hook the CmdStart forward and check for pev_buttons & IN_ATTACK. That's when your player holds the attack button.
|
| All times are GMT -4. The time now is 13:07. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.