OnConsoleInput

From NPC for VCMP 0.4 Servers
Revision as of 17:24, 24 December 2022 by Habi (talk | contribs) (Created page with "{{Welcome| desc=This function is called when something is typed into the [[ConnectNPC |console] and enter key is pressed.| params=<syntaxhighlight lang="lua">( text )</syntaxh...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

{{Welcome| desc=This function is called when something is typed into the [[ConnectNPC |console] and enter key is pressed.|

params=

( text )

text: The string that was typed in the console.

|

retvals=This function does not return any specific values.|

example=

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

}}