<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ploep</id>
	<title>Multi Theft Auto: Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ploep"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Ploep"/>
	<updated>2026-04-29T02:00:26Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OutputDebugString&amp;diff=37586</id>
		<title>OutputDebugString</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OutputDebugString&amp;diff=37586"/>
		<updated>2013-11-15T19:53:22Z</updated>

		<summary type="html">&lt;p&gt;Ploep: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function outputs scripting debug messages, which can be read by enabling the debug textbox. The debug display level can then be set so that info or warning messages get filtered out.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool outputDebugString ( string text, [ int level=3, int red=255, int green=255, int blue=255 ] )             &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''text:''' the text to be output to the debug box.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''level:''' the debug message level. Possible values are:&lt;br /&gt;
**'''0:''' Custom message&lt;br /&gt;
**'''1:''' Error message&lt;br /&gt;
**'''2:''' Warning message&lt;br /&gt;
**'''3:''' Information message (default)&lt;br /&gt;
*'''red:''' The amount of red in the color of the text. Default value is 255.&lt;br /&gt;
*'''green:''' The amount of green in the color of the text. Default value is 255.&lt;br /&gt;
*'''blue:''' The amount of blue in the color of the text. Default value is 255. &lt;br /&gt;
'''Note:''' Color values are only applied when debug level is 0.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the debug message was successfully output, ''false'' if invalid arguments are specified.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This script notifies when its resource has been loaded using a debug message:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function resourceStartNotify ( resourcename )&lt;br /&gt;
	-- if the started resource is this one&lt;br /&gt;
	if ( resourcename == getThisResource() ) then&lt;br /&gt;
		-- send an info debug message as a notification&lt;br /&gt;
		outputDebugString ( &amp;quot;Resource &amp;quot; .. getResourceName(resourcename) .. &amp;quot; loaded.&amp;quot; )&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onResourceStart&amp;quot;, getRootElement(), resourceStartNotify )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Server functions}}&lt;/div&gt;</summary>
		<author><name>Ploep</name></author>
	</entry>
</feed>