Raised This Month: $ Target: $400
 0% 

Check client command


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 03-14-2009 , 18:02   Re: Check client command
Reply With Quote #4

It actually is possible... I made this check with statsme a long time ago... you CAN check whenever a player uses an unknown command but CANNOT check if a player has a command that is aliased... or... you could... by sending it and expect unknown command, if you receive it, it's not set, if not, it's aliased

don't really remember how I did it tough, I'll search through my old scripts and see what I can find

EDIT:
yeah, was something like hooking TextMsg and checking argument 2 with "#Game_unknown_command"... or something

EDIT #2: tested a code and works, gets user ID and the unknown command sent:
PHP Code:
#include <amxmodx>
 
public plugin_init()
{
    
register_event("TextMsg""hook_textMsg""b""2=#Game_unknown_command")
}
 
public 
hook_textMsg(idmsg[], cmd[])
{
    
client_print(0print_chat"%d - unknown command: %s"idcmd)
 
    return 
PLUGIN_CONTINUE

__________________

Last edited by Hunter-Digital; 03-15-2009 at 13:47. Reason: added working code
Hunter-Digital 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 08:55.


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