Garry's Mod Wiki

concommand.Run

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

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

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.

Page Links


Special Pages


Wikis

?

Render Time: 42ms

Session 0
DB GetPage 2
Generate Html 18
SaveChanges 8
Render Body 0
Render Sidebar 12