AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to block cvars (https://forums.alliedmods.net/showthread.php?t=84821)

Speed! 02-01-2009 11:23

How to block cvars
 
should register_concmd("amx_cvar sv_gravity.......
RETURN_PLUGINHANDLED
work?
or there is a better way?

Dr.G 02-01-2009 11:36

Re: How to block cvars
 
To block a command? explain abit more :)

BOYSplayCS 02-01-2009 11:44

Re: How to block cvars
 
You're going to use a concmd to block a cvar?

no, that won't work. lol

Dr.G 02-01-2009 12:02

Re: How to block cvars
 
Speed If u wanna delete a command like that, just delete it or comment it so its ignored. However u might wanna delete the function the command is calling.... Attach your script if u can get it to work.... http://www.amxmodx.org/funcwiki.php?...ncmd&go=search

SnoW 02-01-2009 13:17

Re: How to block cvars
 
Quote:

Originally Posted by Dr.G (Post 753835)
Speed If u wanna delete a command like that, just delete it or comment it so its ignored. However u might wanna delete the function the command is calling.... Attach your script if u can get it to work.... http://www.amxmodx.org/funcwiki.php?...ncmd&go=search

He's wanting block a cvar, not delete a command.
Quote:

Originally Posted by Speed! (Post 753812)
should register_concmd("amx_cvar sv_gravity.......
RETURN_PLUGINHANDLED
work?
or there is a better way?

Do you want a method that could block admins changing some cvars, so the cvar value would be default and it couldn't be changed?

Exolent[jNr] 02-01-2009 13:45

Re: How to block cvars
 
Just make a plugin that does:
Code:
public plugin_init() {     register_concmd("amx_cvar", "CmdCvar", ADMIN_CVAR); } public CmdCvar(client, level, cid) {     if( !cmd_access(client, level, cid, 2) ) return PLUGIN_HANDLED_MAIN;         new cvar[32];     read_argv(1, cvar, sizeof(cvar) - 1);         if( equali(cvar, "your_blocked_cvar") )     {         // cvar is blocked         return PLUGIN_HANDLED;     }         return PLUGIN_HANDLED_MAIN; }

And place it at the top of the plugins.ini

BOYSplayCS 02-01-2009 13:51

Re: How to block cvars
 
That is so retarded, you can block a cvar using a concmd.

Exolent[jNr] 02-01-2009 15:15

Re: How to block cvars
 
That's not what I'm doing.
I'm detecting the amx_cvar command, and blocking the cvar value for that cvar being changed.

Pinatz 02-01-2009 15:22

Re: How to block cvars
 
So how would you solve the problem then BOIYSokayCS ?
If you wanna block fps_max > 300 for example. Everything under it should be available ^^

Exolent[jNr] 02-01-2009 15:24

Re: How to block cvars
 
For client cvars, use a cvar checker plugin.


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

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