Fixed bugs...
In plugin_init i have registered this event
Code:
register_event("CurWeapon","Change_Wpn","be")
Then in the funktion i forgotten to check if the changed weapon is active...
Code:
// Called on player switches his weapon
public Change_Wpn(id)
{
if (!get_pcvar_num(g_speed_enabled)) return PLUGIN_HANDLED
new WeaponNum = read_data(2)
new WeaponActive = read_data(1)
if (WeaponNum != WeaponUsed[id] && WeaponActive)
{
param[0] = id
calculate_speed(WeaponNum)
give_speed()
WeaponUsed[id] = WeaponNum
}
return PLUGIN_HANDLED
}
__________________