Code:
new bool:speed = true
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("CurWeapon", "check_speed", "be")
register_cvar("sv_knifespeed", "410.0")
register_cvar("sv_c4speed", "410.0")
register_cvar("sv_awpspeed", "320.0")
register_logevent("new_round",2,"1=Round_Start")
}
public new_round() {
new ft = get_cvar_num("mp_freezetime")
set_task(float(ft), "allow_speed", 0)
return PLUGIN_CONTINUE
}
public allow_speed() {
speed = true
return PLUGIN_CONTINUE
}
public check_speed(id) {
if(speed == false)
return PLUGIN_CONTINUE
new clip, ammo
new weapon = get_user_weapon(id, clip, ammo)
switch (weapon) {
case CSW_KNIFE: set_user_maxspeed(id,(get_cvar_float("sv_knifespeed")))
case CSW_C4: set_user_maxspeed(id,(get_cvar_float("sv_c4speed")))
case CSW_AWP: set_user_maxspeed(id,(get_cvar_float("sv_awpspeed")))
}
return PLUGIN_CONTINUE
}
But it still doesn't work!
__________________