concommand.Add
Example
Adds a concommand killyourself
which will kill the user.
concommand.Add( "killyourself", function( ply, cmd, args )
ply:Kill()
print( "You killed yourself!" )
end )
Creates a console command that runs a function in lua with optional autocompletion function and help text.
This cannot be a name of existing console command or console variable. It will silently fail if it is.
This only properly works on the client since it is not networked. Arguments passed are:
Adds a concommand killyourself
which will kill the user.