Raised This Month: $ Target: $400
 0% 

Plugin to limit cl_cmdrate


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
danny
Junior Member
Join Date: Apr 2004
Old 12-25-2004 , 12:53  
Reply With Quote #5

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") }
danny is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:15.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode