AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to set delay for knife secondary attack (attack2) ? (https://forums.alliedmods.net/showthread.php?t=210848)

Kz1.0 03-15-2013 09:33

How to set delay for knife secondary attack (attack2) ?
 
I searched but not found any good solution :cry:.
I want to make a plugin that when I using Knife and press +attack2, the animation played, but X Seconds later, the real damage and sound appear (if hit) or just sound (if miss) :cry:

SpeeDeeR 03-15-2013 14:27

Re: How to set delay for knife secondary attack (attack2) ?
 
Hook Ham_Weapon_SecondaryAttack to weapon_knife
Code:

#include <fakemeta>
#define        m_flNextSecondaryAttack                        47
set_pdata_float(iEnt, m_flNextSecondaryAttack, 9999.9, 4);

9999.9 is the delay of the attack.

Kz1.0 03-16-2013 10:25

Re: How to set delay for knife secondary attack (attack2) ?
 
Tks, but it just the time between two attacks, not the one I described above.


All times are GMT -4. The time now is 21:40.

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