Garry's Mod Wiki

Garry's Mod Wiki

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

Description

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 console if no callback is found.

This will still be called for concommands removed with concommand.Remove but will return false. This will not be called for concommands added by the engine, only those made from Lua.

Arguments

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

Returns

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

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated twice a day. Edits and history are not available.

Last Parsed: Loading...