Trying to catch ServerCommand
OK I uncommented this link in my moduleconfig.h:
Code:
ANd this is my code: Code:
But when I type ANY command I can't catch anything, even if I try SERVER_PRINT(crap). When I type a command in the server console and hit enter it doesn't print anything. I have done this before so I'm confused as to what I'm doing wrong. Help pls. |
ummm perhaps
Code:
CMD_ARGV(0)be Code:
CMD_ARGV[0] |
try printing crap since its passed into the function
Code:
|
As I have told you on IRC, the function you are hooking is the one AMXX invokes when you run the server_cmd native. That is, external DLLs can tell the engine to send some crap to its command parser as a server command - without the need to type it into the console. Note that you would only be able to intercept it when the gamedll calls it - which is pretty unlikely. There is no generic server command hook, like ClientCommand.
AMX/AMXX does this by calling REG_SVR_COMMAND for every registered server command / client command. They register every command to a central hook (plugin_srvcmd in srvcmd.cpp), which does a similar action to the function you have posted. |
Re: Trying to catch ServerCommand
Quote:
|
Re: Trying to catch ServerCommand
so did you guys succeed hooking server commands? ^^ i need it
|
Re: Trying to catch ServerCommand
Quote:
|
| All times are GMT -4. The time now is 20:17. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.