Raised This Month: $12 Target: $400
 3% 

[how to] hook client settings commands


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ehha
SourceMod Donor
Join Date: Apr 2006
Location: Sibiu
Old 09-06-2009 , 08:30   [how to] hook client settings commands
Reply With Quote #1

I would like to "grab" the moment when a client types developer, for example, in console, also with a argument. I've tried this:
Code:
public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR);     register_clcmd("developer", "check_dev"); } public check_dev(id) {     client_print(0, print_chat, "Hooked!");     read_argv(1, arg, 32) }
Failed.
I know about query_client_cvar & how to use it but this requires a repetitive task to check it constantly.
Thank you.
ehha is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 09-06-2009 , 08:33   Re: [how to] hook client settings commands
Reply With Quote #2

It is a cvar so you will need to use query_client_cvar().
__________________
Bugsy is offline
ehha
SourceMod Donor
Join Date: Apr 2006
Location: Sibiu
Old 09-06-2009 , 08:48   Re: [how to] hook client settings commands
Reply With Quote #3

So no matter what clcmd I register it won't work if it's already a client cvar?
__________________
ehha is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 09-06-2009 , 11:00   Re: [how to] hook client settings commands
Reply With Quote #4

developer is a cvar not a client command; there's no way to hook it with register_clcmd.
__________________
Bugsy is offline
Reply


Thread Tools
Display Modes

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 10:47.


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