After i played on a scout only server i missed the fast movements on my own server and specialy with the AWP or other heavy weapon. Due this i had the idea to give every weapon the same weapon speed of 260. I've totally no idea how to make such a plugin and decided to edit a current plugin that already get close to my ideas and used v3x
various weapon speeds for this.
It seems to work very well such as changing between weapons is no problem except one thing, when a new round started and i don't switch between guns or fire a bullet i use the default CS weapon speed, after i fired a shot or changed a weapon then i use again the new weapon speed.
Where i'm looking for is a script that when a player spawned his maxspeed is 260 and then the plugin would work 100%, hopefully someone know how to fix this and want to help me.
here is the edited script of v3x's script code.
Code:
#include <amxmodx>
#include <cstrike>
#include <fun>
#define PLUGIN "PLUGIN"
#define AUTHOR "AUTHOR"
#define VERSION "VERSION"
public plugin_init()
{
register_plugin(PLUGIN,VERSION,AUTHOR)
register_event("CurWeapon","check_speed","be")
register_cvar("knife_speed","800")
register_cvar("m4a1_speed","100")
register_cvar("default_speed","400")
register_logevent("new_round",2,"1=Round_Start")
}
public new_round(id)
{
set_user_maxspeed(id,float(get_cvar_num("default_speed")))
return PLUGIN_CONTINUE
}
public check_speed(id)
{
new clip, ammo
new weapon = get_user_weapon(id,clip,ammo)
switch(weapon)
{
case CSW_KNIFE:
{
set_user_maxspeed(id,float(get_cvar_num("knife_speed")))
}
case CSW_M4A1:
{
set_user_maxspeed(id,float(get_cvar_num("m4a1_speed")))
}
default:
{
set_user_maxspeed(id,float(get_cvar_num("default_speed")))
}
}
return PLUGIN_CONTINUE
}
__________________