OnConsoleInput

From NPC for VCMP 0.4 Servers
Revision as of 17:25, 24 December 2022 by Habi (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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);
	}
}