OnConsoleInput

From NPC for VCMP 0.4 Servers
Jump to navigation Jump to search

This function was added in v1.5 patch2 and will not work on previous versions.

Description:
This function is called when something is typed into the console and enter key is pressed.


Parameters:

( text )

text: The string that was typed in the console.


Return Values:
This function does not return any specific values.


Example

function OnConsoleInput( text )
{
	try
	{
		local script = compilestring( text );
		script();
	}catch(e)
	{
		print(e);
	}
}