Garry's Mod Wiki


  boolean concommand.Run( Player ply, string cmd, any args, string argumentString )


This is used internally - although you're able to use it you probably shouldn't. You might be looking for RunConsoleCommand or Player:ConCommand.

Used by the engine to run a console command's callback function. This will only be called for commands that were added with AddConsoleCommand, which concommand.Add calls internally. An error is sent to the player's chat if no callback is found.

This will still be called for concommands removed with concommand.Remove but will return false.


1 Player ply
Player to run concommand on
2 string cmd
Command name
3 any args
Command arguments. Can be table or string
4 string argumentString
string of all arguments sent to the command


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