AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Doing something with client command. (https://forums.alliedmods.net/showthread.php?t=168331)

vamppa 09-27-2011 12:09

Doing something with client command.
 
"stop"

hooking like this "register_clcmd("stop", "quit")" doesn't work as very few commands can be hooked like this right?
I read somewhere those commands would need to be specifically hooked, how is that possible? an entire plugin method for one command? have no idea.

how about cl_query_cvar "stop" or what was the name.
is that possible? or does it only work for cvar with values?

The Idea is to have a punishment set kick for whoever executes the command "stop".
the stop command itself may be executed at this time.
it does not need to block or prevent. kick will do.

ConnorMcLeod 09-27-2011 12:14

Re: Doing something with client command.
 
Commands can be hooked with register_clcmd.

Only few commands CAN'T be hooked because it's client commands, such as record, stop, status, connect, retry etc... because those commands are never sent to server.
There is NO way to hook those commands.

query_client_cvar is for cvars, not for commands, and it only allow you to check cvars value, not when cvars values are changed.

vamppa 09-27-2011 12:21

Re: Doing something with client command.
 
damn I see.
thank you for the clarification.

kotinha 09-27-2011 12:49

Re: Doing something with client command.
 
Is it possible to check if the client is recording a demo?

vamppa 09-28-2011 10:53

Re: Doing something with client command.
 
guess the same answer applies to that mate.


All times are GMT -4. The time now is 19:39.

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