PHP Code:
#define SPEED 1.3
public Action OnPlayerRunCmd(int client, int &buttons)
{
if (IsPlayerAlive(client) && (buttons & IN_ATTACK || buttons & IN_ATTACK2))
{
char[] sWeapon = new char[32];
GetClientWeapon(client, sWeapon, 32);
if (StrEqual(sWeapon, "weapon_knife"))
{
int iWeapon = GetEntPropEnt(client, Prop_Send, "m_hActiveWeapon");
SetEntPropFloat(iWeapon, Prop_Send, "m_flNextPrimaryAttack", GetEntPropFloat(iWeapon, Prop_Send, "m_flNextPrimaryAttack") - ((SPEED - 1.0) / 2));
SetEntPropFloat(iWeapon, Prop_Send, "m_flNextSecondaryAttack", GetEntPropFloat(iWeapon, Prop_Send, "m_flNextSecondaryAttack") - ((SPEED - 1.0) / 2));
}
}
}
Untested.
__________________