AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Rate setter updated need help (https://forums.alliedmods.net/showthread.php?t=14465)

godlike 06-21-2005 14:53

Rate setter updated need help
 
well i just add one ting to the rate setter.
Make it admin protection .So that the players cant change the settings in the game . And the admin(s) can change it whenever they want.
And add this =
ex_interp 0.1
I dont think its hard :) thx.

WaZZeR++ 06-21-2005 15:43

sorry, i cant read this script, the logic doesnt fit...:/ but maybe im just tired :)

nightscreem 06-21-2005 17:11

ok here is the script with admin you need admin_cvar to change it, i hope it works but what do should ex_interp 1.0 do where is it is it in an inc or is it a new float? and why you need this
Code:
/* AMXMOD X script. * * version 1.0 Scripted by Godlike * *   v1.0 - Initial Release * * */ #include <amxmodx> #include <amxmisc> public plugin_init() {     register_plugin("Rates Setter","1.0","godlike")     register_cvar("cvar_i_RS","1")     set_task(2.0,"Set_Rates",0,"",0,"b")     return PLUGIN_HANDLED } public Set_Rates(id) {     if(get_user_flags(id) == ADMIN_CVAR) {         new i = get_cvar_num("cvar_i_RS")         if(i<=32)         {             new i_connected = is_user_connected(i)             new i2 = i + 1             if(i_connected==1)             {                 client_cmd(i,"rate 25000")                 client_cmd(i,"cl_cmdrate 101")                 client_cmd(i,"cl_updaterate 101")                                 set_cvar_num("cvar_i_RS",i2)                 set_task(0.0,"Set_Rates")                             return PLUGIN_HANDLED             }             else             {                 set_cvar_num("cvar_i_RS",i2)                 set_task(0.0,"Set_Rates")                 return PLUGIN_HANDLED             }         }         else         {             set_cvar_num("cvar_i_RS",1)             return PLUGIN_HANDLED         }         return PLUGIN_HANDLED     }     return PLUGIN_HANDLED }

WaZZeR++ 06-21-2005 17:21

it is a cvar....
Code:
client_cmd(i,"ex_interp 0.1")
add this under the other client_cmd's

and night...
Code:
if(get_user_flags(id) == ADMIN_CVAR)
dont this only do the commands on admins then?

maybe
Code:
if(!is_user_admin(id))
insteed?

godlike 06-22-2005 08:16

thx dude :) going to test it now :)

godlike 06-22-2005 08:24

nope same thing....
No admin protection im sry :(

WaZZeR++ 06-22-2005 15:11

try this...
Code:
#include <amxmodx> #include <amxmisc> public plugin_init() {     register_plugin("Rates Setter","1.0","godlike")     register_cvar("cvar_i_RS","1")     set_task(2.0,"Set_Rates",0,"",0,"b")     return PLUGIN_HANDLED } public Set_Rates() {        new i = get_cvar_num("cvar_i_RS")     if(i<=32) {         new i2 = i + 1         if(is_user_connected(i)) {             if (!is_user_admin(i) {                 client_cmd(i,"rate 25000")                 client_cmd(i,"cl_cmdrate 101")                 client_cmd(i,"cl_updaterate 101")                 client_cmd(i,"ex_interp 0.1")             }             set_cvar_num("cvar_i_RS",i2)             set_task(0.0,"Set_Rates")                         return PLUGIN_HANDLED         }         else {             set_cvar_num("cvar_i_RS",i2)             set_task(0.0,"Set_Rates")             return PLUGIN_HANDLED         }     }     else {         set_cvar_num("cvar_i_RS",1)         return PLUGIN_HANDLED     }     return PLUGIN_HANDLED     }

nightscreem 06-22-2005 15:41

but they can still change the interp

WaZZeR++ 06-22-2005 15:56

how can they change it?

nightscreem 06-22-2005 16:25

in console it's a client command i think you should do
set_user_info(id,set_user_info(id, "ex_interp", "0.1");
with a cvar


All times are GMT -4. The time now is 08:01.

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