Right now I have a simple plugin that sets the users maxspeed to 1000, and makes him run alot faster. But the minute I change to another weapon, the speed goes away, and the user has to say /speedme again. Im not sure why, but its very annoying. Also im running cs 1.5 if that makes a difference. Why does it do this?
heres the code:
Code:
//////////////////////
#include <amxmodx>
#include <amxmisc>
#include <fun>
/////////////////////
public plugin_init()
{
register_plugin("test","0.1","ashade")
register_clcmd("say /speed","speed_me",0,": gives client speed")
register_cvar("sv_speedme","1")
}
public speed_me(id)
{
if(get_cvar_num("sv_speedme")==1)
{
set_user_maxspeed(id,float(1000))
client_cmd(id,"cl_forwardspeed 1000")
client_cmd(id,"cl_sidespeed 1000")
client_cmd(id,"cl_backspeed 1000")
}
return PLUGIN_HANDLED
}
__________________