return a client cvar
so i was looking at fullupdate_blocker and what the plugin does is binds over the fullupdate command with a new function so that a player cannot use fullupdate.
Code:
register_clcmd("fullupdate","fullupdate") |
Re: return a client cvar
Well if that command is registered like that, you couldn't restore it. Because the command would always be "fullupdate".
You can just make a CVar that can disable/enable the use of it. |
Re: return a client cvar
that would be a good alternative, but how does one disable a cvar? i guess you can catch the command with client_command, but then how do you keep the command from being executed? sorry if i'm ignorant...i'm only just learning these modules. :)
|
Re: return a client cvar
Code:
This should work, not sure. But "amx_blockfullupdate 1/0" will enable disable the usage of it. |
Re: return a client cvar
well done sir! that's a very useful bit of code to me. a quick question about client_command. what exactly triggers it. for instance, does any client cvar change go to that function. does something like a weapon drop?
|
Re: return a client cvar
Quote:
And because weapon drop ("drop") is a command, that would trigger it. |
Re: return a client cvar
error when compil
Quote:
|
Re: return a client cvar
Code:
|
Re: return a client cvar
and if i want to make the same with cl_pitchspeed? can I?
|
Re: return a client cvar
cl_pitchspeed is a cvar, so it cannot be detected as a command.
You will need to use a cvar enforcing plugin. |
| All times are GMT -4. The time now is 05:29. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.