Quote:
Originally Posted by Drak
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