Return to Main Docs Page

concommand.Run

NewerShared.png Used by the engine to run a console command's callback function. This will only be called for commands that were added with ConCommand, which concommand.Add calls internally.

boolean concommand.Run( CBasePlayer ply , string cmd, string args )
               
This is used internally - although you're able to use it you probably shouldn't. You might be looking for engine.ClientCmd.

Arguments:


  • 1) CBasePlayer ply
  • Player to run concommand on

    This cannot be a name of existing console command or console variable. It will silently fail if it is.

  • 2) string cmd
  • Command name.

  • 3) string args
  • Command arguments.

Returns:


  • 1) boolean
  • true if the console command with the given name exists, and false if it doesn't.