Raised This Month: $ Target: $400
 0% 

Limiting spectator modes


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Drak
Veteran Member
Join Date: Jul 2005
Old 12-21-2007 , 23:23   Re: Limiting spectator modes
Reply With Quote #5

Quote:
Originally Posted by karar View Post
I think read argv command should be:
PHP Code:
read_argv(1,arg,31); 
btw i put some client_print commands to debug e.g. i added (before if command):
PHP Code:
client_print(0,print_console,"Spec mode switched to = <%s>"mode
and this command never showed up on console... then for testing i changed the register clccommand to:
PHP Code:
register_clcmd("say""cmdBlock"); 
and now console was printing the debug line fine.. so say command is being captured fine but spec_mode command is not. Hope this helps you guys figring out a solution
I used zero on "read_argv" because zero means the command, according to the docs. As for "spec_mode" not registering. I think it's because it's a client-side command. If it's a CVar you can query a client-side cvar like so:
Code:
public GetSpecMode(id) {     new Value = query_client_cvar(id,"spec_mode","cvar_spec_mode"); } public cvar_spec_mode(id,const cvar[],const value[]) {     return str_to_num(value); }
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
 



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 11:06.


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