Thread: Command Blocker
View Single Post
Seather
Member
Join Date: Oct 2004
Old 08-09-2008 , 19:07   Re: Command Blocker
Reply With Quote #23

as mentioned before in this thread, there are some commands that sm_blockcommand is not capable of blocking, for example "jointeam" in cs:s

here is some code that fixes that (might have a problem if executed more than once on same command, like in a server.cfg)
Code:
	new flags = GetCommandFlags(command);
	
	if(flags == -1)
		RegConsoleCmd(command, Cmd_Null);
	else
		SetCommandFlags(command, flags|FCVAR_CHEAT);
	
	ReplyToCommand(0, "Command successfully blocked");
...
public Action:Cmd_Null(client, args)
{
	return Plugin_Handled;
}
Seather is offline