Raised This Month: $ Target: $400
 0% 

Changing client cvars.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
.OM NOM NOM NOM
BANNED
Join Date: Dec 2009
Old 01-03-2010 , 00:33   Changing client cvars.
Reply With Quote #1

Good day to you gentlemen, and happy New Year.
I've been looking over scripting tutorials for some time now, it seems like my miserable brain can't handle even 30 lines of code.


I’m trying to make a client change a cvar by typing a specific message to mm1/2 -- chat.

Ex:

*** 1337 monkey killa King Kong *** types: /fps
Instantly forcing his fps_max to 101.

<3
.OM NOM NOM NOM is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 01-03-2010 , 00:37   Re: Changing client cvars.
Reply With Quote #2

you mean something like this?

PHP Code:

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /fps","do_fps")
    
    
// Add your code here...
}
public 
do_fps(id)
{
    
client_cmd(id,"fps_max 101")

__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
.OM NOM NOM NOM
BANNED
Join Date: Dec 2009
Old 01-03-2010 , 00:41   Re: Changing client cvars.
Reply With Quote #3

Ok, now I feel bad.
That's exactly what I need.
.OM NOM NOM NOM is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-03-2010 , 01:28   Re: Changing client cvars.
Reply With Quote #4

Deja vu?

You know, they could just type the cvar in console.
__________________
fysiks is offline
platzpatrone
Veteran Member
Join Date: Apr 2007
Location: Germany
Old 01-03-2010 , 02:16   Re: Changing client cvars.
Reply With Quote #5

Quote:
Originally Posted by fysiks View Post
Deja vu?
yes, http://forums.alliedmods.net/showthread.php?t=114120

its same like bumping
platzpatrone is offline
.OM NOM NOM NOM
BANNED
Join Date: Dec 2009
Old 01-03-2010 , 03:04   Re: Changing client cvars.
Reply With Quote #6

#5
http://sexyurl.info/cookies
.OM NOM NOM NOM is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 01-03-2010 , 04:08   Re: Changing client cvars.
Reply With Quote #7

ppl go crazy with these though even though you guys do not support slow hacking it still happens....
Doc-Holiday is offline
.OM NOM NOM NOM
BANNED
Join Date: Dec 2009
Old 01-03-2010 , 07:47   Re: Changing client cvars.
Reply With Quote #8

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

My powers are growing.
.OM NOM NOM NOM is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-03-2010 , 20:32   Re: Changing client cvars.
Reply With Quote #9

Note:
Changing a client's settings (such as cvars, binds, etc.) is not allowed until the client has accepted the fact that your server will do that.
You can do this through a menu or by client entering a command, etc.
Doing so without the client's permission is called slowhacking and is not allowed.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 04:10.


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