I’m currently trying to code an anti cheat, and i want to override the lua_openscript_cl command to ban anyone trying to use it. how would you go about doing this?
You can’t remove non-Lua console commands or convars.
alright. how should I got about doing this then, where if someone enters that into console, it auto bans them?
You can’t. sv_allowcslua 0 prevents the command from being executed.
I’m aware of that, but I want to do this so bypassers(like gDaap, Alexander, etc) are useless.
This calls a hook (ExecuteStringCommand) whenever someone runs a command, I haven’t tested it though:
You can return a bool to block the command aswell
The module you linked is disliked by rtti data & only works for commands which get transfered through net_StringCmd. lua_openscript_cl is not one of them.