Is it possible to see which client executed the "cmd" command from his console ? I want to trace the command
Code:
cmd name "whatever you want"
which when executed from any client on a CS 1.5 server, changes the name of the sever to "whatever you want", which is very irritating.
I tried "register_concmd" & "register_clcmd" but they don't work for "cmd". I also tried "client_command" this also works for other commands like "say" or "kill" but don't works for "cmd"
the code that i wrote is as follows:
Code:
#include <amxmodx>
#include <amxmisc>
public client_command(id) {
new comm[10], name[20]
get_user_name (id, name, 19)
read_argv (0,comm,9)
if (contain(comm,"cmd")!=-1)
client_print(0,print_chat,"cmd command was run by : %s",name)
return PLUGIN_CONTINUE
}
public plugin_init() {
register_plugin("Disable cmd command","1.0","Smoke")
return PLUGIN_CONTINUE
}
I have not used "return PLUGIN_HANDLED" coz then no command is able to execute on the client as the plugin stops them all. This can be handled though but thats not the main concern. the main thing is how to catch "cmd".