FCVAR_SERVER_CAN_EXECUTE prevented server running command

Hello,

I get this error when i Press F1.

my code is:

main.lua



function GM:ShowHelp(ply)
	ply:ConCommand("__hello start")
end


So basically, what i want is when i press F1, it run the console command “__hello start”.

But i get this error :

FCVAR_SERVER_CAN_EXECUTE prevented server running command: __hello

What should i do ?

I assume source has some rules regarding underscores at the start of a concommad?

Datastream uses console commands that begin with “__”, so I would presume double under-scores are reserved for built in game commands.

I also wouldn’t recommend using console commands for opening a help screen, event networking should be done with net.

It seems to me like a ConCommand flag issue or maybe just how the engine handles commands prefixed with “__”.

If it was a flag problem you could try



ConCommand *cmd = g_pCvar->FindCommand("__hello");
if(cmd != NULL) {
	cmd->m_nFlags = FCVAR_NONE;
}


But, as I said I think it’s the way the game handles ConCommands prefixed with “__”.