Raised This Month: $ Target: $400
 0% 

intercept the cmd command


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
kaboomkazoom
Junior Member
Join Date: Dec 2004
Old 02-13-2005 , 17:26   intercept the cmd command
Reply With Quote #1

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".
kaboomkazoom is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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