Raised This Month: $ Target: $400
 0% 

Limiting spectator modes


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
karar
Junior Member
Join Date: Dec 2007
Old 12-21-2007 , 21:42   Re: Limiting spectator modes
Reply With Quote #4

Quote:
Originally Posted by Drak View Post
That would give off a compile error.
Code:
#include <amxmodx> public plugin_init()
{
register_clcmd("spec_mode", "cmdBlock");
}

public cmdBlock(id) {
new arg[32]
read_argv(0,arg,31)
new mode = str_to_num(arg)
if(mode != 1 || mode != 4)
return PLUGIN_HANDLED_MAIN
}

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


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