Right I just tried that avalanche. Using amxmodx 1.0.
I have core and cstrike module. amx_plugincfgmenu showed it was running.
As this only sends a message the the player with a low rate I added a few lines which would message everyone (I think, I've never scripted before).
So with your version, and my slightly modified version it didn't work. People could join with lower than 50 cl_cmdrate and it would stay less than 50. I also put sv_mincmdrate 50 in server.cfg.
Code:
#include <amxmodx>
new oldrate[33];
new name[33];
public client_putinserver(id) {
get_user_name(id,name[id],33)
new rate[5]
get_user_info(id,"cl_cmdrate",rate,4)
oldrate[id] = str_to_num(rate)
console_print(0,"%s joined the server with cl_cmdrate %d",name[id],oldrate[id])
if(oldrate[id] < get_cvar_num("sv_mincmdrate")) {
console_print(id,"%s using invalid rate of %d, increasing to %d",name[id],oldrate[id],get_cvar_num("sv_mincmdrate"))
client_cmd(id,"cl_cmdrate %d",get_cvar_num("sv_mincmdrate"))
}
}
public client_disconnect(id) {
client_cmd(id,"cl_cmdrate %d",oldrate[id])
}
public plugin_init() {
register_plugin("RestrictRate","0.1","Avalanche")
register_cvar("sv_mincmdrate","50")
register_clcmd("amx_test","checktest")
}