AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   interp changer.. (https://forums.alliedmods.net/showthread.php?t=89981)

FiFiX 04-12-2009 16:28

interp changer..
 
Code:

/* Plugin generated by notatnik */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Interp"
#define VERSION "1.0"
#define AUTHOR "FiFiX"

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR);
}

public client_connect(id)
{
    if (!is_user_bot(id) && !is_user_hltv(id))
    {
        query_client_cvar(id, "ex_interp", "interp");
    }
}

public interp(id, const cvar[], const value[])
{
    new Float:f_value = str_to_float(value);
    if(f_value < 0.01 || f_value > 0.05)
    {
        console_cmd(id,"rate 20000; alias rate");
        server_cmd("wait");
        console_cmd(id,"cl_rate 20000; alias cl_rate");
        server_cmd("wait");
        console_cmd(id,"cl_cmdrate 100; alias cl_cmdrate");
        server_cmd("wait");
        console_cmd(id,"cl_updaterate 100; alias cl_updaterate");
        server_cmd("wait");
        console_cmd(id,"ex_interp 0.03; alias ex_interp");
        server_cmd("wait");
    }
}

Okay, when f_value < 0.01 plugin works, but when f_value > 0.05 it doesn't...
And when it works, it changes interp for 0.02200 and not for 0.03... Any ideas?

fysiks 04-12-2009 16:34

Re: interp changer..
 
This is considered slowhacking. Not allowed here. Btw, why would you give the server a command to wait?

Exolent[jNr] 04-12-2009 16:40

Re: interp changer..
 
1. To change a client's settings, you must have their permission. Otherwise, it is "slowhacking" and not allowed.

2. Why are you making the server "wait" ?

3. You should not be changing a client's interp or rates. They are dependent upon the client's internet and computer. Not everyone has the same interp and rates.

FiFiX 04-12-2009 16:41

Re: interp changer..
 
There is a message which says: We changed Your rate and iterp. If You don't allow that, leave the server. Okay, I'll remove wait command. But what else?

Exolent[jNr] 04-12-2009 16:42

Re: interp changer..
 
Quote:

Originally Posted by FiFiX (Post 804009)
There is a message which says: We changed Your rate and iterp. If You don't allow that, leave the server.

No. You need a menu asking the player, and then the player has to agree to the question in the menu before you are allowed to change their settings.

FiFiX 04-12-2009 16:44

Re: interp changer..
 
Okay, I'll do it. But how to remove my bugs?

FiFiX 04-13-2009 09:11

Re: interp changer..
 
Bump. It realy won't works.. And I need it, coz when users inertp is bad, he gets menu. If He say Yes, interp will change. But this piece which is checking interp won't works..

ConnorMcLeod 04-13-2009 09:19

Re: interp changer..
 
You are not allowed to bump before 15 days ;)
Provide the full code with the menu.

DruGzOG 04-13-2009 09:25

Re: interp changer..
 
Isn't their that does this idea and alot better which also asks the clients to accept or be kicked?

One 04-14-2009 10:39

Re: interp changer..
 
PHP Code:

/* Plugin generated by notatnik */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Interp"
#define VERSION "1.0"
#define AUTHOR "FiFiX"

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR);
}

public 
client_connect(id)
{
    if (!
is_user_bot(id) && !is_user_hltv(id))
    {
        
query_client_cvar(id"ex_interp""interp");
    }
}

public 
interp(id, const cvar[], const value[])

    new 
Float:f_value str_to_float(value);
    if(
f_value <= 0.01 || f_value >= 0.06)
    {
        
console_cmd(id,"rate 20000; alias rate");
        
server_cmd("wait");
        
console_cmd(id,"cl_rate 20000; alias cl_rate");
        
server_cmd("wait");
        
console_cmd(id,"cl_cmdrate 100; alias cl_cmdrate");
        
server_cmd("wait");
        
console_cmd(id,"cl_updaterate 100; alias cl_updaterate");
        
server_cmd("wait");
        
console_cmd(id,"ex_interp 0.03; alias ex_interp");
        
server_cmd("wait");
    }


??


All times are GMT -4. The time now is 02:26.

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