Skip knife draw animation
Is it possible to skip the knife draw animation and be able to slash/stab players instantly when switching to weapon_knife?
|
Re: Skip knife draw animation
Execute the Ham_Weapon_PrimaryAttack/Ham_Weapon_SecondaryAttack in Ham_Item_Deploy.
|
Re: Skip knife draw animation
I would like to make the player to be able to execute the attack by pressing the mouse button, not attacking automatically.
I would like to skip the animation and allow the player to use the knife if they want. |
Re: Skip knife draw animation
So if I'm correct, I need to do the following tasks:
- Detect when switching weapons -> I can detect this event with Ham_Item_Deploy - Set knife viewmodel animation to idle -> I've tried set_pev(playerId, pev_weaponanim, 0) without success :( - Set next attack timer to zero to allow the player to attack as soon as they want -> I've tried setting m_flNextPrimaryAttack, m_flNextSecondaryAttack without success :( |
Re: Skip knife draw animation
IIRC the knife draw animation is played in the client (too) so even if you disable it server side it would still play for anyone with cl_lw 1(basically every player).
|
Re: Skip knife draw animation
So set the m_flNextPrimaryAttack/m_flNextAttack to 0.0. The animation would't be removed but player would be able to attack without wait untill the idle animation.
|
Re: Skip knife draw animation
I set m_flNextPrimaryAttack/m_flNextAttack to 0.0, but I was unable to attack while the animation was playing.
|
Re: Skip knife draw animation
PHP Code:
Code:
{ |
Re: Skip knife draw animation
A little off-topic here, but I always wanted to know if the CD_ID blocks get_user_weapon from returning the weapon ID in others plugins, am I right?
|
| All times are GMT -4. The time now is 17:27. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.