Skip to content

concommand.concommand

Andrew McWatters edited this page Jun 11, 2016 · 15 revisions

concommand()

Parameters

**Usage:** `concommand( name, helpString, callback )`
Name Type Description
name string Name of the console command
helpString string Help text displayed when using the help console command
callback function Callback to run when the console command is dispatched

Example

concommand( "connect", "Connects to a server",
	function( _, _, _, argS, argT )
		if ( argT[ 1 ] == nil ) then
			_G.print( "connect <address>" )
			return
		end

		connect( argS )
	end
)

See Also

Clone this wiki locally