I thought you may want to implement this into the cexec command. I thought, you would create a console command clientside, that runs another console command, which is set as a variable. Like this:
AddCSLuaFile()
concommand.Add("cexec", function()
RunConsoleCommand( curcexec )
end)
then, serverside, set the command to be run, then run it, like this:
function ulx.cexec( calling_ply, target_plys, command )
curcexec = command
for _, v in ipairs( target_plys ) do
v:ConCommand( "cexec" )
end
ulx.fancyLogAdmin( calling_ply, "#A ran #s on #T", command, target_plys )
end
Of course, this could be dangerous, so you may not want to implement it. But, there will still be some commands that can only be run by the player typing them in console, like "quit" and "bind". Not even lua scripts can run them.