Block secondary knife attack for a certain time
Hi all, well as the title says, how can I block the knife for a certain time and without animation bugs? For example, when a player uses the secondary attack of the knife I want to block it for 10 seconds and after that time passes, the player can use it again and so on. Can someone give me an example please? Thanks in advance
|
Re: Block secondary knife attack for a certain time
m_flNextSecondaryAttack
|
Re: Block secondary knife attack for a certain time
It's okay like this?
PHP Code:
|
Re: Block secondary knife attack for a certain time
The hook must be PRE not POST.
|
Re: Block secondary knife attack for a certain time
I change it thanks, but when I attack once then I can not use the secondary attack again, I mean, when ten seconds pass I can not use it again, it always block.
|
Re: Block secondary knife attack for a certain time
PHP Code:
|
Re: Block secondary knife attack for a certain time
@Celena Luna, you don't need to check if weapon is an valid entity. If it's not, hook will not be called. Return values it's ignored in post callbacks, so you don't need to return anything.
|
Re: Block secondary knife attack for a certain time
Quote:
|
Re: Block secondary knife attack for a certain time
Quote:
|
Re: Block secondary knife attack for a certain time
Sorry to revive but I forget this, Celena Luna I tested your code but blocks the secundary attack all the time..
|
| All times are GMT -4. The time now is 12:12. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.