We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
May we get a way to implement clientside console command autocompletion for a server-defined console command?
I think a nice solution for this would be to re-implement concommand.Run, maybe something like this?
function Run( player, command, arguments, args ) local LowerCommand = string.lower( command ) if ( CommandList[ LowerCommand ] != nil ) then CommandList[ LowerCommand ]( player, command, arguments, args ) return true -- default behaviour else if ( AutoComplete[ LowerCommand ] != nil ) then return nil -- pass to the server and attempt to run command there end Msg( "Unknown command: " .. command .. "\n" ) return false -- default behaviour end
Which would allow you to define console commands as such:
if SERVER then concommand.Add("server_test", function(ply, scmd, tcmd) ply:ChatPrint("you said: " .. scmd) end) else -- nil passed as command definition, pass to server, keep autocomplete on client conommand.Add("server_test", nil, function() return {"server_test autocomplete_param"} end) end
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Details
May we get a way to implement clientside console command autocompletion for a server-defined console command?
I think a nice solution for this would be to re-implement concommand.Run, maybe something like this?
Which would allow you to define console commands as such:
The text was updated successfully, but these errors were encountered: