Raised This Month: $ Target: $400
 0% 

deleteme


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
naeo
Member
Join Date: Apr 2006
Old 12-04-2006 , 16:36   deleteme
Reply With Quote #1

deleteme

Last edited by naeo; 02-06-2007 at 15:55. Reason: deleteme
naeo is offline
dutchmeat
Senior Member
Join Date: Sep 2006
Old 12-05-2006 , 09:06   Re: Rate manager help..register_clcmd error?
Reply With Quote #2

Does it say 'Blaaah'?
__________________
before you criticize someone, you should walk a mile in their shoes. that way, when you criticize them, you're a mile away and you have their shoes.
dutchmeat is offline
jim_yang
Veteran Member
Join Date: Aug 2006
Old 12-05-2006 , 09:12   Re: Rate manager help..register_clcmd error?
Reply With Quote #3

mini suggestion: use this function
clamp ( value, min=cellmin, max=cellmax )
Returns value if it is in the range min-max, min if value is lower than min, max if higher than max.
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
dutchmeat
Senior Member
Join Date: Sep 2006
Old 12-05-2006 , 09:24   Re: Rate manager help..register_clcmd error?
Reply With Quote #4

Code:
new myvalue = 330 new max = 400 new min = 100 if (myvalue <= min && myvalue => max) console_print(id,"yep");
__________________
before you criticize someone, you should walk a mile in their shoes. that way, when you criticize them, you're a mile away and you have their shoes.
dutchmeat is offline
Old 12-05-2006, 09:33
naeo
This message has been deleted by naeo.
jim_yang
Veteran Member
Join Date: Aug 2006
Old 12-05-2006 , 09:38   Re: Rate manager help..register_clcmd error?
Reply With Quote #5

maybe it's client-side cmd, not sent to the server, so you can't catch it.
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
dutchmeat
Senior Member
Join Date: Sep 2006
Old 12-05-2006 , 09:51   Re: Rate manager help..register_clcmd error?
Reply With Quote #6

ehm yes, that's right, rate, and actually all network commands are all clientside.
You'll have to make your own command then.
__________________
before you criticize someone, you should walk a mile in their shoes. that way, when you criticize them, you're a mile away and you have their shoes.
dutchmeat is offline
Old 12-05-2006, 12:39
naeo
This message has been deleted by naeo.
Old 12-05-2006, 14:22
naeo
This message has been deleted by naeo.
The Specialist
BANNED
Join Date: Nov 2006
Old 12-05-2006 , 14:25   Re: Rate manager help..register_clcmd error?
Reply With Quote #7

please dont double post
The Specialist is offline
Send a message via AIM to The Specialist
dutchmeat
Senior Member
Join Date: Sep 2006
Old 12-05-2006 , 16:19   Re: Rate manager help..register_clcmd error?
Reply With Quote #8

use postthink:

Code:
/* Coded by nAE0^ @ 04/12/06 */ /* Based on AMX_RM for CS 1.5/AMX */ #include <amxmodx> #include <amxmisc> #include <engine> // Using global min/max defines for performance ;-) #define MAX_PLAYERS 17 #define DEAD_RATIO 0.4 #define CHECK_FREQ 10.0 #define MAX_UPR 101 #define MAX_RATE 25000 #define MIN_UPR 80 #define MIN_RATE 20000 #define DEAD_RATE 10000 #define DEAD_UPR 40 #define DEAD_INTERP 0.025 #define DEAD_FORCE_STRING "cl_updaterate %e; ex_interp %f; rate %d", DEAD_UPR, DEAD_INTERP, DEAD_RATE new old_upr[MAX_PLAYERS], old_rate[MAX_PLAYERS], Float:old_interp[MAX_PLAYERS] public client_spawned(id) {     new execstring[100]     // NULL TERMINATE JUST IN CASE!     execstring[format(execstring, 99, "cl_updaterate %d; rate %d; ex_interp %f", old_upr[id], old_rate[id], old_interp[id])] = 0     client_cmd(id, execstring)     return PLUGIN_CONTINUE } public client_killed(id) {     new id = read_data(2)     client_cmd(id, DEAD_FORCE_STRING)     return PLUGIN_CONTINUE } public client_connect(id) {     if(is_user_hltv(id))         return PLUGIN_CONTINUE     new tmp_upr[30], tmp_rate[30], tmp_interp[30]     get_user_info(id, "cl_updaterate", tmp_upr, 29)     get_user_info(id, "rate", tmp_rate, 29)     get_user_info(id, "ex_interp", tmp_interp, 29)     old_upr[id]    = clamp(str_to_num(tmp_upr), MIN_UPR, MAX_UPR)     old_rate[id]   = clamp(str_to_num(tmp_rate), MIN_RATE, MAX_RATE)     old_interp[id] = str_to_float(tmp_interp)     console_print(id, "rate:%d, cl_updaterate:%d, ex_interp:%f", old_rate[id], old_upr[id], old_interp[id])     return PLUGIN_CONTINUE } public check_changes(id) {     new cur_rate[30], cur_upr[30], cur_interp[30], num_rate,num_upr,Float:num_interp     if((id!=0)&&(!is_user_hltv(id)))     {             get_user_info(id, "cl_updaterate", cur_upr,    29)             get_user_info(id, "cl_rate",       cur_rate,   29)             get_user_info(id, "ex_interp",     cur_interp, 29)             num_rate   = str_to_num   (cur_rate)             num_upr    = str_to_num   (cur_upr)             num_interp = str_to_float (cur_interp)   if(is_user_alive(id))   {          if(old_rate[id]   != num_rate)          {              old_rate[id]   = clamp(num_rate, MIN_RATE, MAX_RATE)          }         if(old_upr[id]    != num_upr)         {                     old_upr[id]    = clamp(num_upr,  MIN_UPR,  MAX_UPR )         }         if(old_interp[id] != num_interp)         {                     old_interp[id] = num_interp         }         }else{                         if(old_rate[id]   != DEAD_RATE  )         {          old_rate[id]   = clamp(num_rate, MIN_RATE, MAX_RATE)         }         if(old_upr[id]    != DEAD_UPR   )         {          old_upr[id]    = clamp(num_upr,  MIN_UPR,  MAX_UPR )         }         if(old_interp[id] != DEAD_INTERP)         {          old_interp[id] = num_interp         }      }     } } public client_PostThink(id) // check it every frame { check_changes(id); } public plugin_init() {     register_plugin("Ratemanager", "1.1", "nAE0")     register_event("ResetHUD", "client_spawned", "be","1=1")     register_event("DeathMsg","client_killed","a")     set_cvar_num("sv_maxupdaterate", MAX_UPR)     set_cvar_num("sv_minupdaterate", MIN_UPR)     set_cvar_num("sv_maxrate", MAX_RATE)     set_cvar_num("sv_minrate", MIN_RATE)     return PLUGIN_CONTINUE }
__________________
before you criticize someone, you should walk a mile in their shoes. that way, when you criticize them, you're a mile away and you have their shoes.
dutchmeat is offline
naeo
Member
Join Date: Apr 2006
Old 12-05-2006 , 16:19   Re: Rate manager help..register_clcmd error?
Reply With Quote #9

@ The Specialist
Uhm. It's not OK to have two posts after one another?

It's different content (as in not double).. But if it's a rule around here i'll try to remember that.

@ Dutchmeat
Wont checking every frame use ALOT of resources? (i mean.. the server is running at 500-1500FPS) maybe it's another kind of frame?

I checked the amxx funcwiki but there really wasnt much info about it.. Any explanation on what it does?
Thanks for the idea anyway :]

Last edited by naeo; 12-05-2006 at 16:24.
naeo is offline
dutchmeat
Senior Member
Join Date: Sep 2006
Old 12-05-2006 , 16:35   Re: Rate manager help..register_clcmd error?
Reply With Quote #10

You'll have to make one check, to prevent the others, if the first check failed.
like this:

Code:
  if(old_rate[id] != num_rate || old_upr[id] != num_upr || old_interp[id] != num_interp)  continue;
__________________
before you criticize someone, you should walk a mile in their shoes. that way, when you criticize them, you're a mile away and you have their shoes.
dutchmeat is offline
Reply



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 07:00.


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