AlliedModders

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

turshija 10-17-2009 11:35

How to block specific cvars?
 
For example, I want to block cl_yawspeed on clients (LJ scripts etc)...

I've tried with "alias cl_yawspeed something" and than add function something that kicks that player, blahblahblah ... But its says Invalid alias something (stupid steam update)

any other possibilities ?

Also I thought maybe I could exec "cl_yawspeed 0" on every client whenever they do something, but I think that would be too much CPU consuming ... (I know execing cvars on clients is prohibited, but I can add menu when someone connects so they have to agree with that etc, etc, who cares anyway lol)

xPaw 10-17-2009 11:36

Re: How to block specific cvars?
 
Get steam, problem solved.

turshija 10-17-2009 11:43

Re: How to block specific cvars?
 
?
have you read my post at all ?
I need this for Steam, kapish?
I believe client_cmd(player, "alias cl_yawspeed bla") would work for nonsteam coz it's old protocol, but it DOESN'T work for Steam ...
New steam update disallows that ...
I need it for STEAM ...
Is there any way to go around that ?
That hooking thingy or something like that ?
So I can detect whenever they use cl_yawspeed and do something with them (kick, ban, computer explode, doesn't matter, etc) ...

Jon 10-17-2009 11:50

Re: How to block specific cvars?
 
Quote:

I know execing cvars on clients is prohibited
It's the only way.

turshija 10-17-2009 12:08

Re: How to block specific cvars?
 
Okay ...
Than I will add menu for everyone that joins the server to make them agree the rules of execing cvars on them or else bai bai ... :)
my problem is still there ...
how do I exec that when execing existing alias doesn't work ?

Jon 10-17-2009 12:31

Re: How to block specific cvars?
 
use query_client_cvar( ) for checking values, client_cmd( ) for exec.

xPaw 10-17-2009 12:44

Re: How to block specific cvars?
 
cl_yawspeed is not working in cs steam version, thats what i was mean

turshija 10-17-2009 23:16

Re: How to block specific cvars?
 
are you sure ?
I can give you my steam user so you can add me and we can go on my server so I can demonstrate the script I have thats working pretty fine ...
The server is running latest Exolent's JUMPSTATS plugin ...

My question is: how do I check if player used, for example +right ... I want to put menu for everyone to agree "You agree that server will force cl_yawspeed 0 on you?" ... Yes - ok, No - kick ... If yes - whenever plugin detects +right or +left, it spams cl_yawspeed 0 to that player like 10 times per second next 2-3 seconds ... It ensures that the player 99% isn't using any kind of lj/cj script ...


All times are GMT -4. The time now is 22:41.

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